-
Notifications
You must be signed in to change notification settings - Fork 2
Add Node.js CI workflow #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
|
|
||
| name: Node.js CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [18.x, 20.x, 22.x] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 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:
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 |
||
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v4 | ||
|
Comment on lines
+23
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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 🤖 Prompt for AI Agents |
||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: 'npm' | ||
| - run: npm ci | ||
| - run: npm run build --if-present | ||
| - run: npm test | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The workflow adds
18.xto the test matrix even though this repo explicitly declares Node>=20.0.0inpackage.json(and.nvmrcis20), 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 👍 / 👎.