ci: add typecheck/test/build workflow on Node 20 and 24 - #6
Merged
Conversation
This repo had no CI at all while its MCP sibling had three workflows, and the gap was not theoretical: 0.5.2 shipped with `agent-ready --version` printing 0.5.1, because nothing tied src/cli.ts VERSION to package.json. A wrong version misdirects every bug report, and it reached npm because publishing is fully manual here with no gate in front of it. Mirrors agent-ready-mcp's ci.yml, with a Node matrix instead of a single version. package.json declares engines >=20.10 while the main repo pins 24.x, and this is a published CLI run on whatever Node the user happens to have — so both ends need to stay green. Testing one end would hide breakage at the other. Build is included because `files` ships dist/cli.mjs and prepublishOnly rebuilds it: a build that only fails from a clean checkout would otherwise surface during `npm publish`, after the version is already chosen and immutable. Co-Authored-By: Claude Opus 5 (1M context) <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.
Why
This repo had no CI at all, while its MCP sibling has three workflows. The gap wasn't theoretical:
0.5.2shipped withagent-ready --versionprinting0.5.1, because nothing tiedsrc/cli.tsVERSION topackage.json. A wrong version misdirects every bug report, and it reached npm because publishing here is fully manual with no gate in front of it.(That drift is now fixed and guarded by
test/version-sync.test.ts, added in #5 — but only a workflow makes the guard run before a release rather than when someone remembers.)What
Mirrors
agent-ready-mcp/.github/workflows/ci.yml—npm ci→ typecheck → test → build, on PRs and pushes to main.Two deliberate differences:
[20, 24].package.jsondeclaresengines >=20.10; the main agent-ready repo pins24.x. This is a published CLI that runs on whatever Node the user has, so both ends need to stay green — testing one hides breakage at the other.fail-fast: falseso a failure on one version still reports the other.filesshipsdist/cli.mjsandprepublishOnlyrebuilds it, so a build that only fails from a clean checkout would surface duringnpm publish— after the version is chosen and made immutable.Verification
Ran the exact CI sequence locally from a wiped
node_modules:npm ci,npm run typecheck,npm test(77),npm run build— all pass.🤖 Generated with Claude Code