Skip to content

ci: add Node matrix workflow (18.x, 20.x, 22.x)#15

Merged
amacsmith merged 3 commits into
mainfrom
chore/node-matrix-ci
May 10, 2026
Merged

ci: add Node matrix workflow (18.x, 20.x, 22.x)#15
amacsmith merged 3 commits into
mainfrom
chore/node-matrix-ci

Conversation

@amacsmith
Copy link
Copy Markdown
Member

@amacsmith amacsmith commented May 10, 2026

Summary

Adds a Node-version matrix smoke workflow that runs npm ci && npm test on Node 18.x, 20.x, 22.x — the full engine band declared in package.json after #14 lowered the minimum to >=18.0.0. Complements validate.yml (which pins to .nvmrc=20 and only runs on registry/schema/script/package paths) by catching breakage on the other Node versions our engines claim to support.

Credit

Originally proposed by @cryptofixyup in #13. This PR cherry-picks their workflow with refinements:

  • Renamed to node-matrix.yml so the intent is explicit alongside our existing validate.yml, smoke.yml, etc.
  • Pinned actions to checkout@v6 / setup-node@v6 per the actions group bump in chore(actions): bump the actions group across 1 directory with 6 updates #11.
  • Dropped npm run build --if-present (no build script in root).
  • Added permissions: contents: read (least privilege).
  • Added concurrency: cancel-in-progress to drop superseded runs.
  • Added fail-fast: false so all matrix legs report independently.

Test plan

  • All three matrix legs (18.x, 20.x, 22.x) pass npm ci && npm test in CI on this PR.

🤖 Generated with Claude Code

Co-authored-by: cryptofixyup <[email protected]>


Generated by Claude Code

Summary by CodeRabbit

Release Notes

  • Chores

    • Enhanced CI/CD pipeline with automated testing across multiple Node.js versions to ensure compatibility and code quality.
    • Implemented automated version consistency verification across all packages to prevent release discrepancies.
    • Updated test execution configuration for improved robustness.
  • Tests

    • Added comprehensive test suite for version verification logic.

Review Change Stack

Complements validate.yml (which pins to .nvmrc=20) by smoke-testing
'npm ci && npm test' on the full engine band declared in package.json
(>= 18.0.0 after #14). Catches breakage on newer Node versions before
downstream users hit it.

Originally proposed by @cryptofixyup in #13. Refinements vs the
original:
- Renamed to node-matrix.yml so the intent is explicit alongside
  validate.yml, smoke.yml, etc.
- Pinned actions to the versions used elsewhere in the repo
  (checkout@v6, setup-node@v6) per the actions group bump in #11.
- Dropped 'npm run build --if-present' (no build script in root).
- Added 'permissions: contents: read' to follow the principle of
  least privilege.
- Added concurrency group to cancel superseded runs.
- Added 'fail-fast: false' so all matrix legs report independently
  rather than aborting on the first failure.

Co-authored-by: cryptofixyup <[email protected]>
Copilot AI review requested due to automatic review settings May 10, 2026 07:09
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 10, 2026

Review Change Stack

Warning

Rate limit exceeded

@amacsmith has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 6 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c707e769-ca00-488b-822f-c8970c4262f4

📥 Commits

Reviewing files that changed from the base of the PR and between dddae7f and 34b199e.

📒 Files selected for processing (6)
  • .github/workflows/node-matrix.yml
  • .github/workflows/publish-cli.yml
  • .github/workflows/publish-pysdk.yml
  • package.json
  • scripts/__tests__/check-versions.test.mjs
  • scripts/check-versions.mjs
📝 Walkthrough

Walkthrough

This PR adds multi-package release verification by introducing a version consistency checker (scripts/check-versions.mjs), integrating it into CLI and Python SDK publish workflows, adding a new MCP publish workflow, and introducing a Node.js matrix test workflow. The checker validates that package versions match git tag versions across four packages: root, CLI, MCP, and Python SDK.

Changes

Release Version Verification

Layer / File(s) Summary
Version Checker Implementation
scripts/check-versions.mjs
Exports readVersion, tagToVersion, and check functions to read versions from package.json and pyproject.toml, parse prefixed git tags, validate semver format, and detect version/tag mismatches.
Version Checker Tests
scripts/__tests__/check-versions.test.mjs
Comprehensive test coverage for multi-package validation, malformed semver detection, CLI/MCP/PySDK tag/version mismatches, refs/tags/ prefix handling, and helper function behavior.
Test Script Configuration
package.json
Test and coverage scripts updated to use bash nullglob for safe glob expansion when test files are absent.
CI Workflows
.github/workflows/node-matrix.yml, publish-cli.yml, publish-mcp.yml, publish-pysdk.yml
New Node.js matrix test workflow on main; new MCP publish workflow triggered by mcp-v* tags; version check steps integrated into CLI and PySDK publish workflows using github.ref.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 A rabbit hops through versions true,
Tag and package, matching through,
Four packages dance in harmony,
While workflows guard with certainty!
No semver breaks, no tags astray—
Release day's saved, hip-hip-hooray! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: add Node matrix workflow (18.x, 20.x, 22.x)' directly and clearly summarizes the main change—adding a new GitHub Actions workflow that tests across a Node version matrix. It is concise, specific, and reflects the primary objective of the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/node-matrix-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to run a basic CI smoke test across the Node.js versions claimed by the repository’s engines.node range, complementing the existing validate.yml workflow (which pins Node via .nvmrc).

Changes:

  • Introduces a new node-matrix.yml workflow that runs npm ci and npm test on Node 18.x, 20.x, and 22.x.
  • Adds least-privilege permissions: contents: read plus concurrency cancellation and fail-fast: false for matrix legs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +2
# Multi-Node smoke test. Complements validate.yml (which pins to .nvmrc =
# Node 20) by exercising npm ci + npm test on the engine band declared in
amacsmith and others added 2 commits May 10, 2026 18:06
…ion test

- npm test/test:coverage scripts now use bash glob expansion via
  `bash -c 'shopt -s nullglob; node --test scripts/__tests__/*.test.mjs'`
  so Node 18/20 (which don't support glob in --test) work alongside
  Node 22/24.

- New scripts/check-versions.mjs runs before each publish workflow
  (cli, mcp, pysdk) and asserts that the package.json version matches
  the tag-implied version. Catches the class of bug where a tag like
  cli-v0.2.0 publishes a 0.1.1 package because version bump was missed.
  12 regression tests cover semver malformedness, tag/version mismatch,
  refs/tags/ prefix tolerance, pyproject.toml read path, and
  unknown-prefix tolerance.

Closes #15.
@amacsmith amacsmith merged commit dfeb823 into main May 10, 2026
10 of 11 checks passed
amacsmith added a commit that referenced this pull request May 10, 2026
…ersions

Add googleapis/release-please-action@v4 wired for the monorepo:
release-please-config.json declares 4 per-component tracks (root, cli, mcp,
pysdk), .release-please-manifest.json is the source of truth for current
versions, and .github/workflows/release-please.yml triggers on every push
to main. Component-scoped tags (cli-vX.Y.Z, mcp-vX.Y.Z, pysdk-vX.Y.Z) drive
the existing publish-*.yml workflows on merge of each Release PR.

Bump publishable components past the v0.2.0 work so the latest CI fixes
ship:
- cli 0.1.1 -> 0.1.2 (Node 18/20 test glob fix from #15)
- mcp 0.1.1 -> 0.1.2 (publish-time version regression guard from #15)
- pysdk 0.1.0 -> 0.1.1 (same regression guard wired into publish-pysdk.yml)

mcp/server.json version mirrored so the MCP Registry stays in sync with
the npm package. Manifest seeded with the new versions so release-please
doesn't re-open a redundant Release PR on first run.

docs/ops/release-process.md added with the normal automated flow + manual
override fallback + check-versions guard semantics + troubleshooting
table. docs/ops/npm-org-setup.md now points at it for day-to-day flow.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.

3 participants