From 23b237cd2bfbc3998f00248266bedbd5eddcd645 Mon Sep 17 00:00:00 2001 From: Nathan Herald Date: Tue, 21 Jul 2026 11:48:31 +0200 Subject: [PATCH] ci: gate the vitest suite in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The only CI on push/PR was `nix build` (.github/workflows/nix.yml) — the vitest suite never ran in CI. That is how two breaks reached main unseen: the #111 exit-reap regression against the post-exit parity contract (parity #1) and the #106 `completions` help-docs drift. Both are green under `nix build` and red under `npm test`. Add .github/workflows/test.yml: on pull_request + push-to-main, checkout -> setup-node 22 (matches flake.nix nodejs_22) -> npm ci -> npm run build (the suite exercises dist/cli.js + dist/server.js) -> npm test. NOTE: this gate runs RED on the current main until the 4 known vitest failures land fixes (3 post-exit parity + 1 completions) — which is precisely the gate doing its job. --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..50431f4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Test +on: + pull_request: + push: + branches: [main] + +jobs: + vitest: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + # Match flake.nix (nodejs_22) so the CI test runtime tracks the + # Nix-built runtime and versions don't skew. + node-version: 22 + cache: npm + - run: npm ci + # The vitest suite exercises the compiled CLI/daemon (dist/cli.js, + # dist/server.js), so build before running the tests. + - run: npm run build + - run: npm test