mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-08-25 16:33:14 +00:00
The repo moved to npm workspaces and CI followed the core package: there is a job for typecheck, test, build, verify-dist and pack across three node versions. Nothing runs the CLI's suite — roughly 2470 tests, including the 29 provider bridge suites that byte-compare against goldens captured before the extraction. Issue #809 says every phase PR passes a byte-identical parity gate; until now nothing enforced it. Two things stood in the way. The CLI's test script was `vitest`, which is watch mode — in CI that hangs a runner instead of failing. And the root test script forwarded only to the CLI workspace, so core's guardrail suite never ran from the command a contributor reaches for, while the CLI half of it could not run from a clean checkout at all: core's exports resolve to dist, which is gitignored. The root script now builds core before running either suite. That costs a build on every local run, which is a real annoyance, but the alternative is a script that only works if you happen to have built core earlier. The CLI job runs the suite on two node lines: the engines floor (22.13.x) and 24.x. The second leg is not matrix sprawl — the zed bridge parity suite seeds its fixture with zlib's zstd, which only landed in 22.15, so a floor-only job would silently skip the byte-compare gate this job exists to run and still go green. The floor leg keeps the >=22.13 promise enforced; the 24.x leg makes the parity gate actually execute. The job carries a 15-minute timeout — measured wall time for the whole suite is ~2 minutes — so a hung run cannot burn a runner for the default six hours, and the workspace-versions check runs before npm ci: it only reads the three manifests and the lockfile, so a drift fails in a second instead of after a full install.
89 lines
2.2 KiB
YAML
89 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
core:
|
|
name: core (node ${{ matrix.node }})
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ['22.13.x', '24.x', '26.x']
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Install from lockfile
|
|
run: npm ci
|
|
|
|
- name: Check workspace versions
|
|
run: npm run check:workspace-versions
|
|
|
|
- name: Typecheck core
|
|
run: npm run typecheck --workspace=@codeburn/core
|
|
|
|
- name: Test core
|
|
run: npm test --workspace=@codeburn/core
|
|
|
|
- name: Build core
|
|
run: npm run build --workspace=@codeburn/core
|
|
|
|
- name: Verify every export target exists
|
|
run: npm run verify-dist --workspace=@codeburn/core
|
|
|
|
- name: Verify package contents
|
|
run: npm pack --workspace=@codeburn/core --dry-run
|
|
|
|
cli:
|
|
name: cli (node ${{ matrix.node }})
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: ['22.13.x', '24.x']
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
|
|
- name: Check workspace versions
|
|
run: npm run check:workspace-versions
|
|
|
|
- name: Install from lockfile
|
|
run: npm ci
|
|
|
|
- name: Build core
|
|
run: npm run build --workspace=@codeburn/core
|
|
|
|
- name: Test cli
|
|
run: npm test --workspace=codeburn
|
|
|
|
semgrep:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Semgrep
|
|
run: pip install semgrep
|
|
|
|
- name: Run Semgrep bracket-assign guard
|
|
run: |
|
|
set -e
|
|
semgrep --config .semgrep/rules/no-bracket-assign-hot-paths.yml \
|
|
--strict --json \
|
|
packages/cli/src/providers/ packages/cli/src/parser.ts > semgrep-out.json
|
|
FINDINGS=$(jq '.results | length' semgrep-out.json)
|
|
if [ "$FINDINGS" -gt 0 ]; then
|
|
jq -r '.results[] | "::error file=\(.path),line=\(.start.line)::\(.extra.message)"' semgrep-out.json
|
|
exit 1
|
|
fi
|