Skip to content

Ci test fix#98

Open
cs01 wants to merge 10 commits intomainfrom
ci-test-fix
Open

Ci test fix#98
cs01 wants to merge 10 commits intomainfrom
ci-test-fix

Conversation

@cs01
Copy link
Owner

@cs01 cs01 commented Mar 6, 2026

ci: run unit tests in CI, smarter test.js setup checks

Summary

  • compiler.test.ts and unit tests were never run in CI — only self-hosting and examples were. A broken unit test would pass CI.
  • npm test unconditionally rebuilt the entire compiler every run, even when nothing had changed.

Changes

  • ci.yml: add npm test step (10min timeout) to both build-linux-glibc and build-macos jobs, after native chad is built and before examples/self-hosting
  • scripts/test.js: replace always-rebuild with staleness checks — only rebuilds dist/ if src/**/*.ts is newer, only builds .build/chad if missing; fails fast with a clear error + fix command if vendor artifacts are missing

Test plan

  • CI passes on Linux and macOS
  • npm test skips rebuild when dist/ is fresh
  • npm test fails immediately with a clear message if vendor artifacts are missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant