Add Node.js CI workflow#13
Conversation
This workflow sets up a CI pipeline for Node.js applications, including installation of dependencies, building the code, and running tests across multiple Node.js versions.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughAdds a Node.js CI GitHub Actions workflow (matrix: 18.x, 20.x, 22.x) with checkout, setup, install, optional build, and tests; also refreshes generated_at/last_synced/drift_checked_at timestamps in registry and site metadata and updates three README table dates. ChangesNode.js CI Workflow Setup
Registry & Site Timestamp Updates
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e5dd961e9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x, 22.x] |
There was a problem hiding this comment.
Drop unsupported Node 18 from CI matrix
The workflow adds 18.x to the test matrix even though this repo explicitly declares Node >=20.0.0 in package.json (and .nvmrc is 20), so CI is now validating an environment the project does not support. This creates avoidable red builds when scripts or dependencies rely on Node 20+ behavior, which can block merges despite supported runtimes being healthy; the matrix should align to supported versions only.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/node.js.yml (1)
17-21: 💤 Low valueConsider adding fail-fast and timeout configuration.
To improve CI robustness:
- Add
fail-fast: falseto the strategy to allow all Node.js versions to complete testing even if one fails- Add
timeout-minutesto the job to prevent hung builds🔧 Suggested enhancement
strategy: + fail-fast: false matrix: node-version: [18.x, 20.x, 22.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + timeout-minutes: 10🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/node.js.yml around lines 17 - 21, Update the GitHub Actions job strategy and job-level timeout: inside the existing strategy block (the matrix that defines node-version) add fail-fast: false so other matrix jobs continue running even if one fails, and add a timeout-minutes key at the job level (e.g., under the job that uses strategy/matrix) to cap maximum run time and avoid hung builds; reference the strategy/matrix node-version entries when editing to ensure placement is correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/node.js.yml:
- Around line 23-25: Update the GitHub Actions steps referencing
actions/checkout and actions/setup-node to use the latest stable major versions
by changing the action references from actions/checkout@v4 to
actions/checkout@v6 and from actions/setup-node@v4 to actions/setup-node@v6 in
the workflow file (look for the uses: entries for actions/checkout and
actions/setup-node).
- Line 19: Update the GitHub Actions Node.js matrix under the node-version key
to remove EOL versions and test current supported LTS releases by replacing the
array [18.x, 20.x, 22.x] with the supported set (e.g., [22.x, 24.x]); if you
must keep legacy testing, include 20.x only explicitly after confirming
requirement, but do not keep 18.x which is EOL.
---
Nitpick comments:
In @.github/workflows/node.js.yml:
- Around line 17-21: Update the GitHub Actions job strategy and job-level
timeout: inside the existing strategy block (the matrix that defines
node-version) add fail-fast: false so other matrix jobs continue running even if
one fails, and add a timeout-minutes key at the job level (e.g., under the job
that uses strategy/matrix) to cap maximum run time and avoid hung builds;
reference the strategy/matrix node-version entries when editing to ensure
placement is correct.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ece5f14b-e456-465f-af7f-2c9c20b82f4f
📒 Files selected for processing (1)
.github/workflows/node.js.yml
📜 Review details
🔇 Additional comments (2)
.github/workflows/node.js.yml (2)
1-10: LGTM!The workflow name is descriptive, and the trigger configuration appropriately runs CI on pushes and pull requests to the main branch.
31-31: ⚡ Quick winTest script is already defined in package.json.
The
package.jsoncontains a test script (node --test 'scripts/__tests__/*.test.mjs'), so thenpm testcommand will execute successfully. Adding--if-presentis not necessary for this repository.> Likely an incorrect or invalid review comment.
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x, 22.x] |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
What are the currently supported Node.js LTS versions as of May 2026?
💡 Result:
As of May 9, 2026, the Node.js “LTS” release lines currently supported by the Node.js project are: 1) Node.js 24.x — Active LTS [1] 2) Node.js 22.x — Maintenance LTS [1] 3) Node.js 20.x — Maintenance LTS (ends Apr 30, 2026; still an LTS line during May 2026 only if downstream/security tooling continues it, but per the project schedule its EOL date is Apr 30, 2026) [2][3] Note: Node.js 25.x is “Current” (not LTS) [1][2], and Node.js 26.x is also “Current” (not yet LTS; enters LTS in October 2026) [4].
Citations:
- 1: https://nodejs.dev/en/about/releases/
- 2: https://github.com/nodejs/LTS
- 3: https://nodejs.org/en/about/eol
- 4: https://nodejs.org/en/blog/release/v26.0.0
Update Node.js matrix to remove EOL versions and include current LTS releases.
Node.js 18.x reached end-of-life in April 2025, and Node.js 20.x reached end-of-life on April 30, 2026. Both versions no longer receive security updates. The current matrix should be updated to test against supported releases: Node.js 24.x (Active LTS), 22.x (Maintenance LTS), and optionally 20.x only if legacy support is explicitly required. Testing against EOL versions provides false confidence and should be avoided.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/node.js.yml at line 19, Update the GitHub Actions Node.js
matrix under the node-version key to remove EOL versions and test current
supported LTS releases by replacing the array [18.x, 20.x, 22.x] with the
supported set (e.g., [22.x, 24.x]); if you must keep legacy testing, include
20.x only explicitly after confirming requirement, but do not keep 18.x which is
EOL.
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check the latest releases of GitHub Actions used in this workflow
echo "Checking actions/checkout releases..."
gh api repos/actions/checkout/releases/latest --jq '.tag_name'
echo -e "\nChecking actions/setup-node releases..."
gh api repos/actions/setup-node/releases/latest --jq '.tag_name'Repository: looptech-ai/understand-quickly
Length of output: 167
Update GitHub Actions to the latest versions.
The workflow is using actions/checkout@v4 and actions/setup-node@v4, but v6 is now the latest stable version for both actions. Update to actions/checkout@v6 and actions/setup-node@v6 to ensure access to the latest security patches and features.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/node.js.yml around lines 23 - 25, Update the GitHub
Actions steps referencing actions/checkout and actions/setup-node to use the
latest stable major versions by changing the action references from
actions/checkout@v4 to actions/checkout@v6 and from actions/setup-node@v4 to
actions/setup-node@v6 in the workflow file (look for the uses: entries for
actions/checkout and actions/setup-node).
|
Thanks so much for opening this, @cryptofixyup! 🙏 Genuinely appreciate the contribution and the engagement — this kind of "let's actually test on multiple Node versions" hygiene is exactly what catches breakage before users hit it. Quick context update so you know where things stand:
Thanks again for jumping in! 🚀 |
|
Quick update, @cryptofixyup — and thank you again for kicking this off! 🙏 Here's where we landed:
Genuinely grateful for the engagement. Drop more contributions our way any time! 🚀 Generated by Claude Code |
* ci: add Node matrix workflow (18.x, 20.x, 22.x) 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 <199330534+cryptofixyup@users.noreply.github.com> * fix(ci): Node 18/20 glob expansion + add publish-time version regression 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. --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: cryptofixyup <199330534+cryptofixyup@users.noreply.github.com>
This workflow sets up a CI pipeline for Node.js applications, including installation of dependencies, building the code, and running tests across multiple Node.js versions.
What
Why
Type of change
registry.jsonfor an existing format.schemas/<name>@<int>.jsonplusok/badfixtures.Checklist
idmatchesowner/repoand is unique.okfixture validates, thebadfixture fails.npm testis green locally.npm run validateis green (or the PR explains why agraph_url404s in CI).Signed-off-by:line per DCO, or note in the PR that you'd like help adding one.For non-technical contributors 👋
If this is your first PR, just fill in What and Why. A maintainer will help with anything else.
Summary by CodeRabbit
Chores
Documentation