Files
SMNET StudioandClaude Opus 5 2749fe1ad5 ci: run typecheck and tests on push and pull requests
Nothing was running the 427 tests automatically, so a regression only showed
up when someone happened to run pnpm test locally. Matrix is node 22/24
rather than the engines floor of 20: the test scripts hand
`src/**/*.test.ts` to `node --test` and depend on Node's own glob expansion,
which shell sh does not provide and node 20 does not implement.

The audit job is advisory (continue-on-error) so a CVE published upstream
surfaces without failing an unrelated pull request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 11:45:50 +00:00

57 lines
1.3 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# The `test` scripts pass `src/**/*.test.ts` through to `node --test`
# and rely on Node's own glob expansion, which landed in 22. Node 20 is
# past EOL, so the floor here is deliberately above package.json engines.
node: [22, 24]
name: node ${{ matrix.node }}
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm -r typecheck
- run: pnpm -r test
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
- run: pnpm install --frozen-lockfile
# Advisory only: a CVE published upstream should show up here, not break
# an unrelated pull request.
- run: pnpm audit --prod
continue-on-error: true