Skip to content

Commit 9fd96f8

Browse files
Codebeastclaude
andcommitted
chore(ci): add GitHub Actions workflow — typecheck + tests + npm audit
Remediates HD-4 from the 2026-04-10 audit (docs/audits/mcp-gateway-2026-04-10.md in Stackbilt-dev/codebeast): the public OAuth entry-point worker had zero CI, and that gap let 6 pre-existing test failures sit unnoticed for an unknown duration (stale PUBLIC_SIGNUPS_ENABLED assertion in oauth-handler.test.ts). Those drifting tests directly contributed to the audit's severity miscalculation on H-1 until the critical-chain fix pass caught it. CI job runs on every PR and every push to main: 1. Checkout + Node 20 with npm cache 2. npm ci (clean install from lockfile) 3. npm run typecheck (tsc --noEmit, strict mode enforced) 4. npm test (vitest run — currently 120 tests across 6 files) 5. npm audit --audit-level=high (advisory gate, continue-on-error for now so dep churn doesn't block merges; elevate to blocking once baseline is clean) Not included (deliberate scope): - Deploy gate (separate concern, belongs in a deploy workflow) - Branch protection enforcement (configure via repo settings) - Lint step (no ESLint config present in this repo yet) Follow-up: once this workflow runs green on main, enable branch protection for main requiring the "typecheck + test + audit" check to pass before merge. That turns CI from advisory to enforcing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 256ba06 commit 9fd96f8

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
ci:
11+
name: typecheck + test + audit
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
cache: 'npm'
22+
23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: TypeScript strict check
27+
run: npm run typecheck
28+
29+
- name: Run tests
30+
run: npm test
31+
32+
- name: npm audit (high+ advisories)
33+
run: npm audit --audit-level=high
34+
continue-on-error: true

0 commit comments

Comments
 (0)