Repository navigation
Add CI: build, check built/ is up to date, run tests - #76
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #72.
What it does
.github/workflows/ci.ymlruns on every pull request and on pushes tomaster:npm cion Node 22, with the npm cache.built/and runnpm run build.git status --porcelain -- built/shows any change. Becausebuilt/is rebuilt from scratch, this catches output that is modified (asrc/change wasn't rebuilt), missing (a newsrc/file's output wasn't committed) or stale (a deletedsrc/file's.jsis still committed).npm test.The README now says what CI checks.
Verified locally
I ran the same steps in a fresh worktree off
master:mastersrc/Direction.tsedited, not rebuiltM built/Direction.jssrc/RGBColor.tsdeletedD built/RGBColor.js(andtscerrors 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.jsoncan't resolvevitest, and once that's fixed there are about 60 real errors, mostly constructor calls with the wrong number of arguments inRunnerPenance,HealerPenanceandCannontests. Vitest strips types without checking them, so the tests still run. That's a separate cleanup.🤖 Generated with Claude Code