Skip to content

Add CI: build, check built/ is up to date, run tests - #76

Merged
96jonesa merged 2 commits into
masterfrom
andy/claude/ci
Oct 28, 2026
Merged

96jonesa merged 2 commits into
masterfrom
andy/claude/ci

Conversation

@96jonesa

Copy link
Copy Markdown
Owner

Closes #72.

What it does

.github/workflows/ci.yml runs on every pull request and on pushes to master:

  1. npm ci on Node 22, with the npm cache.
  2. Delete built/ and run npm run build.
  3. Fail if git status --porcelain -- built/ shows any change. Because built/ is rebuilt from scratch, this catches output that is modified (a src/ change wasn't rebuilt), missing (a new src/ file's output wasn't committed) or stale (a deleted src/ file's .js is still committed).
  4. npm test.

The README now says what CI checks.

Verified locally

I ran the same steps in a fresh worktree off master:

Case Result
Clean master passes; 14 files, 292 tests
src/Direction.ts edited, not rebuilt fails: M built/Direction.js
src/RGBColor.ts deleted fails: D built/RGBColor.js (and tsc errors first, since other files import it)

The workflow hasn't run on GitHub yet. This PR is its first run.

Not included

I didn't add type-checking of the tests (tsc -p test). It doesn't pass today: test/tsconfig.json can't resolve vitest, and once that's fixed there are about 60 real errors, mostly constructor calls with the wrong number of arguments in RunnerPenance, HealerPenance and Cannon tests. Vitest strips types without checking them, so the tests still run. That's a separate cleanup.

🤖 Generated with Claude Code

96jonesa and others added 2 commits October 27, 2026 23:32
Runs on pull requests and pushes to master. Rebuilds built/ from scratch
so missing, modified, or stale output (from a deleted src file) all fail
the check, then runs vitest.

Closes #72

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@96jonesa
96jonesa merged commit 6c944ba into master Oct 28, 2026
1 check passed
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.

add CI: build, check built/ is up to date, run tests

1 participant