Skip to content

Commit d59ef32

Browse files
Merge pull request #5 from officialCodeWork/build/phase-0/step-0.4-ci
ci: Gate 0 pipeline — build, typecheck, tests, eval gate, scorecard artifact
2 parents 6a0387c + 2fb4292 commit d59ef32

2 files changed

Lines changed: 60 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# CodeRadar CI — the Gate 0 pipeline.
2+
#
3+
# Every PR must pass: build (strict TS), typecheck, unit tests, and the eval
4+
# gate (eval/thresholds.json). The scorecard is uploaded as an artifact on
5+
# every run, pass or fail, so regressions are inspectable.
6+
#
7+
# Threshold ratchet rule (docs/testing-strategy.md): eval/thresholds.json
8+
# values may be RAISED in any PR; LOWERING one requires a written
9+
# justification in the PR body. Thresholds never loosen silently.
10+
11+
name: CI
12+
13+
on:
14+
push:
15+
branches: [main, development]
16+
pull_request:
17+
18+
concurrency:
19+
group: ci-${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
ci:
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 15
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: pnpm/action-setup@v4 # reads the packageManager field
30+
31+
- uses: actions/setup-node@v4
32+
with:
33+
node-version: 22
34+
cache: pnpm
35+
36+
- name: Install
37+
run: pnpm install --frozen-lockfile
38+
39+
- name: Build (strict TS)
40+
run: pnpm build
41+
42+
- name: Typecheck
43+
run: pnpm typecheck
44+
45+
- name: Unit tests
46+
run: pnpm test
47+
48+
- name: Eval gate
49+
run: node eval/dist/run.js
50+
51+
- name: Upload scorecard
52+
if: always()
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: eval-scorecard
56+
path: eval/scorecard.json
57+
if-no-files-found: ignore

TRACKER.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
## Status
66

77
- **Current phase:** 0 — Foundations
8-
- **Next step:** 0.4CI pipeline
9-
- **Done:** 0.1, 0.2, 0.3
8+
- **Next step:** 1.1Endpoint resolution (constants, templates, patterns)
9+
- **Done:** 0.1, 0.2, 0.3, 0.4
1010
- **Gates passed:** none yet (Gate 0 completes with 0.4)
1111

1212
## What CodeRadar is
@@ -76,7 +76,7 @@ The v0.1 schema is definition-only, which is *wrong* for C1 — fix before build
7676
- CLI: `scan` records commit SHA (via `git rev-parse`, `dirty` from `git status`).
7777
**Accept:** round-trip test (scan → save → load → deep-equal); schema drift test; `coderadar scan` output includes SHA.
7878

79-
### [ ] 0.4 CI pipeline
79+
### [x] 0.4 CI pipeline
8080
**Failure modes:** D1, process
8181
**Build:** GitHub Actions workflow: install (pnpm cache) → build → typecheck → vitest unit tests → `pnpm eval` → upload scorecard as artifact. Threshold ratchet rule documented in the workflow file header (raising OK; lowering needs PR-body justification).
8282
**Accept:** CI green on a PR; a deliberately broken fixture in a test branch turns it red. **Gate 0 passes.**

0 commit comments

Comments
 (0)