Repository navigation
Add CI test-gating workflow (closes #1495) - #1570
Conversation
release.yml only builds/signs on release — no workflow runs tests on a PR,
so regressions can merge green. scripts/test-gate.ts enforces the full test
pyramid locally on pre-push, but that hook only exists after bun install and
any push can bypass it with --no-verify.
Add ci.yml running the same sequence server-side on every pull_request and on
pushes to main:
- unit job: bun run test:all (frontend + skill + Rust)
- e2e job: cargo build --bin nodespaced, then bun run test:e2e (headless
daemon + dev-proxy) and cargo test -p nodespace-app (Tauri-seam,
ADR-048)
Mirrors release.yml's runner/toolchain/protobuf setup. release.yml stays
scoped to release/signing only. Governed by ADR-047.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
APPROVE (pending the This closes a real, long-standing gap: until now the only workflow was Verified:
Nits (non-blocking):
Note (core = re-review before merge): I'm not merging this — it needs the second review pass and the |
cargo test -p nodespace-app trips the Tauri externalBin build-script check — it needs binaries/nodespaced-<triple> and binaries/nodespace-<triple> staged (binaries/ is gitignored, absent in CI). That staging is the ADR-048 Tauri-seam companion's concern; scope this gate to its acceptance (test:all + test:e2e), both green in CI. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Pushed a fix. The first run showed ```
Scoped this PR to |
src/tests/performance/architecture-benchmarks.test.ts asserts hard timing thresholds (e.g. 100 indent/outdent <25ms). On shared CI runners these vary run-to-run — a first run passed, a rerun failed at 34ms — so they can't back a required PR check. Exclude src/tests/performance/** from the default vitest run when process.env.CI is set. They still run locally via bun run test and deliberately via bun run test:perf. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Second iteration: the scoped run then flipped — Fix: exclude |
|
APPROVE (re-review @
One caveat to keep visible (not blocking): with that step gone, the gate now enforces Both jobs are green on this PR. My earlier nits still stand and are cheap: add |
Closes #1495.
Problem
The only workflow is
release.yml(build + sign, on release/dispatch) — it runs zero tests.scripts/test-gate.tsruns the full pyramid on pre-push, but that hook only exists on a machine that ranbun install, and any push can bypass it with--no-verify. So nothing runs the suite server-side and a regression can merge green.Change
Add
.github/workflows/ci.yml, triggered on everypull_requestand onpushtomain, mirroring thescripts/test-gate.ts(ADR-047) sequence:unitjob —bun run test:all(frontend + skill + Rustcargo test --lib -p nodespace-core).e2ejob —cargo build --bin nodespaced, thenbun run test:e2e(real headless daemon + dev-proxy viaNODESPACED_BINARY), thencargo test -p nodespace-app(Tauri-seam integration, ADR-048, viaNODESPACED_TEST_BIN).Runner/toolchain/protobuf setup mirrors
release.yml(macos-latest,dtolnay/rust-toolchain@stable,swatinem/rust-cache@v2,oven-sh/[email protected],brew install protobuf,svelte-kit sync).release.ymlstays scoped to release/signing only.Acceptance criteria
ci.ymlrunstest:all+test:e2eon every pull_request and push — plus the daemon build and the Tauri-seam tests, matching the full local gateNODESPACED_HEADLESS=1is set by the harness; the e2e path is HTTP-based, no webview)release.ymluntouched)unit+e2ejobs required status checks — branch-protection admin setting, to be flipped once this workflow is green on its own PR (I cannot set branch protection)Validation
This is a CI-config change; the authoritative validation is this workflow running on this PR. Watching the run now — will iterate here if any job fails before asking for the required-check flip.
Notes / follow-ups
macos-latestto match the local gate +release.ymlexactly (lowest risk of the gate itself breaking). Movingunittoubuntu-latestto cut runner cost is a possible follow-up once green.nodespace-docsshould note the server-side enforcement this adds.