-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (71 loc) · 2.77 KB
/
Copy pathci.yml
File metadata and controls
87 lines (71 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-test:
name: build · vet · test
runs-on: ubuntu-latest
env:
CGO_ENABLED: "1"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: go build
run: go build ./...
- name: go vet
run: go vet ./...
- name: go test (race)
run: go test -race -timeout 180s ./...
- name: loadsim build tag compiles
run: go build -tags loadtest ./test/loadsim/...
# The seven-day release gate (#202). CI compiles the orchestrator and
# runs its unit tests — parsers, projection fit, threshold logic, report
# renderer. It must NOT run the protocol: that is four to five hours of
# sustained load and a kill -9, and it does not belong on a shared runner.
- name: prefill build tag compiles
run: go build -tags prefill ./test/aggprefill/...
- name: gate build tag compiles
run: go build -tags gate ./test/gate/...
- name: gate unit tests
run: go test -tags gate -race -timeout 60s ./test/gate/...
ui-build:
name: ui · typecheck · build · test
runs-on: ubuntu-latest
# main is source-only: the SPA is built at tag time and embedded via
# //go:embed. Nothing else in CI installs ui/ dependencies, so a frontend
# dependency tree that cannot resolve — or code that cannot typecheck —
# stays invisible until a release tag fails. That happened: a TypeScript
# bump crossed typescript-eslint's peer bound and broke `npm ci` on main
# while every Go job stayed green. This job is the guard.
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '24' # matches the release workflow's build environment
cache: npm
cache-dependency-path: ui/package-lock.json
# `npm ci` fails outright on an unsatisfiable peer graph, which is the
# failure mode this job exists to catch. --ignore-scripts matches the
# release path (scripts/release.sh, release.yml).
- name: install (exact lockfile, no lifecycle scripts)
run: npm ci --ignore-scripts
working-directory: ui
# `npm run build` is `tsc -b && vite build`: the typecheck catches an API
# that a dependency major removed, the bundle catches a broken import.
- name: typecheck and build
run: npm run build
working-directory: ui
- name: the embedded SPA entrypoint exists
run: test -f internal/ui/dist/index.html
- name: unit tests
run: npx --no-install vitest run
working-directory: ui