@@ -11,6 +11,36 @@ concurrency:
1111 cancel-in-progress : ${{ github.ref != 'refs/heads/main' }}
1212
1313jobs :
14+ # Root-level guards: the checks over repo-wide tooling that no per-package
15+ # matrix leg covers. Created by #4863 for the skills gates; #4864 extended it
16+ # to run the root's whole `validate:guards` — the root tooling's format and
17+ # lint, `verify:format-coverage`, `verify:skills`, `verify:typecheck-coverage`,
18+ # the shared-devDependency guard `verify:dep-lockstep`, and `test:scripts`
19+ # (the guard scripts' own unit tests).
20+ # `scripts/verify-skills.mjs` asserts this job keeps running
21+ # `verify:skills:cli` unconditionally, so do not gate these steps with `if:`.
22+ root-guards :
23+ name : Root guards
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v6
27+
28+ - uses : actions/setup-node@v7
29+ with :
30+ node-version : 22
31+ cache : npm
32+
33+ - name : Install dependencies
34+ run : npm ci
35+
36+ - name : Run the root guards
37+ run : npm run validate:guards
38+
39+ # The authoritative `claude plugin validate`, at the pinned CLI version
40+ # (fetched with npx when not installed). Needs no authentication.
41+ - name : Validate skills with the pinned Claude Code CLI
42+ run : npm run verify:skills:cli
43+
1444 detect-packages :
1545 runs-on : ubuntu-latest
1646 outputs :
@@ -24,12 +54,17 @@ jobs:
2454 PACKAGES=$(find . -name package.json -not -path "*/node_modules/*" -exec dirname {} \; | sed 's/^\.\///' | jq -R -s -c 'split("\n")[:-1]')
2555 echo "packages=$PACKAGES" >> $GITHUB_OUTPUT
2656
27- test :
57+ # One leg per TypeScript server, each running ONLY its own package's
58+ # `validate` (format:check -> lint -> typecheck -> build -> test). What no
59+ # leg covers — the root tooling and the cross-workspace guards — is the
60+ # root-guards job above; together they are the root `npm run validate`.
61+ validate :
2862 needs : [detect-packages]
2963 strategy :
64+ fail-fast : false
3065 matrix :
3166 package : ${{ fromJson(needs.detect-packages.outputs.packages) }}
32- name : Test ${{ matrix.package }}
67+ name : Validate ${{ matrix.package }}
3368 runs-on : ubuntu-latest
3469 steps :
3570 - uses : actions/checkout@v6
@@ -39,34 +74,13 @@ jobs:
3974 node-version : 22
4075 cache : npm
4176
77+ # This package plus the root: run from a workspace directory, `npm ci`
78+ # installs only that workspace's dependencies, and the gate's tools
79+ # (Prettier, ESLint) are root devDependencies. A bare root `npm ci` would
80+ # instead run every workspace's `prepare` (a build), coupling the legs.
4281 - name : Install dependencies
43- working-directory : src/${{ matrix.package }}
44- run : npm ci
82+ run : npm ci --workspace src/${{ matrix.package }} --include-workspace-root
4583
46- - name : Run tests
84+ - name : Validate package
4785 working-directory : src/${{ matrix.package }}
48- run : npm test --if-present
49-
50- build :
51- needs : [detect-packages, test]
52- strategy :
53- matrix :
54- package : ${{ fromJson(needs.detect-packages.outputs.packages) }}
55- name : Build ${{ matrix.package }}
56- runs-on : ubuntu-latest
57- steps :
58- - uses : actions/checkout@v6
59-
60- - uses : actions/setup-node@v7
61- with :
62- node-version : 22
63- cache : npm
64-
65- - name : Install dependencies
66- working-directory : src/${{ matrix.package }}
67- run : npm ci
68-
69- - name : Build package
70- working-directory : src/${{ matrix.package }}
71- run : npm run build
72-
86+ run : npm run validate
0 commit comments