Repository navigation
Conversation
Add a GitHub Actions workflow that runs on each pull request and merge, nightly, on demand, and after each pull request merged in super (the super-pr-merged event that superdb-python's CI also gets). It type checks, runs the tests with the saved fixtures, then builds super, makes the reference fixtures again, and runs the tests with those. A change in super that super-ts doesn't match yet, such as a new BSUP version or a change in SUP output, makes it fail. The fixture script skipped any fixture super couldn't make and exited 0, and the tests skip missing fixtures, so with no working super everything passed. The script now exits nonzero when super can't make a fixture. Failures on main are posted to Slack as markdown-lint's are in super, except for runs started by hand. Add a lockfile so CI installs the same TypeScript and @types/node each time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The Problem
super-ts reimplements parts of super: a BSUP decoder, and a SUP formatter that has to match
super -f supbyte for byte. Its reference tests compare it with output thatsupermade when the fixtures were saved (v0.4.0-58, Nov 13), so they keep passing however super changes later. Nothing runs them automatically, either.Also,
npm run fixturesskips any fixture thatsupercan't make and still exits 0, and the tests skip missing fixtures. With nosuperat all,npm teststill passes, with the reference tests marked as skipped.The Changes
test.yaml, that runs on each pull request, nightly at 08:05 UTC, and on demand, like super'smarkdown-lint.yaml. It type checks and runs the tests with the saved fixtures, then buildssuper, makes the fixtures again, and runs the tests with those. It uses Node 22.18, the oldest versionpackage.jsonallows.mainhere and after each pull request merged in super, where it tests the commit that merged. That needssuper-tsadded to super'snotify-downstream-merge.yaml, which I'll do in a super PR once this one merges. It can also be run by hand against any super branch, tag, or commit.mainare posted to Slack the same waymarkdown-lint.yaml's are, with theSLACK_WEBHOOK_BRIMLABS_TESTwebhook that super's "Notify main failure" workflow uses. Runs started by hand aren't posted.npm run fixturesnow exits nonzero ifsupercan't make a fixture, after making the rest.@types/nodeeach time, and a failure points at super rather than at a new release of either.Testing
I made this change with Claude Code. I ran
npm run fixturesand the tests locally on Node 22.18.0 with four builds ofsuper:supernpm run fixturesv0.4.0-74-g4263b1202(main)v0.4.0-31-gf52b66993, which writes BSUP 0.30version mismatch: expected 0.31, found 0.30The third row stands in for a future change in super. The next BSUP version bump will fail CI the same way.
npm run checkpasses, andactionlintfinds no problems in the workflow. This PR's own run is its first real test on GitHub.A
/code-review highpass found 10 issues. Seven were fixed: Node is now pinned to 22.18 as the comment said; the workflow runs after merges here and tests the exact super commit that merged; runs started by hand don't post to Slack; the job's token is read-only (the repo's default is read/write); and the fixture check moved from the workflow intonpm run fixturesas an exit status, which covers local runs too and no longer counts a fixture with empty output (0-byte files) as missing. I declined three:make build. super's history is about 52 MiB andmake buildbuilds three commands, and the tags givesuper -versionitsv0.4.0-75-g008edd5fcform, which is what we paste into issues.main, and the two test steps have separate names, so a run shows whether the pull request or super caused the failure.🤖 Generated with Claude Code