Repository navigation
ci: build with node v27 #7573
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
Open
shivarm
wants to merge
1
commit into
expressjs:master
Choose a base branch
from
shivarm:ci-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
ci: build with node v27 #7573
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| name: alpha | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| - '4.x' | ||
| - '5.x' | ||
| - '5.0' | ||
| paths-ignore: | ||
| - '*.md' | ||
| pull_request: | ||
| paths-ignore: | ||
| - '*.md' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| # Cancel in progress workflows | ||
| # in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run | ||
| concurrency: | ||
| group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest] | ||
| # Node.js 27 is in Alpha (Oct 2026 - Mar 2027), with 27.0.0 planned for April 2027. | ||
| # Workaround for actions/setup-node#1657: `27`, `27.0.0` and `27.0.0-alpha` | ||
| # are not recognized yet, but `latest` currently resolves to the newest Alpha. | ||
| # Once setup-node adds `allow-prereleases: true`, switch to `node-version: 27`. | ||
| node-version: [latest] | ||
|
|
||
| name: Node.js ${{ matrix.node-version }} - ${{ matrix.os }} | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| continue-on-error: true | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Assert Node.js 27 | ||
| shell: bash | ||
| run: node -e "if (process.versions.node.split('.')[0] !== '27') { console.error('Expected Node 27, got ' + process.version); process.exit(1) }" | ||
|
|
||
| - name: Configure npm loglevel | ||
| run: | | ||
| npm config set loglevel error | ||
| shell: bash | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Output Node and NPM versions | ||
| run: | | ||
| echo "Node.js version: $(node -v)" | ||
| echo "NPM version: $(npm -v)" | ||
|
|
||
| - name: Run tests | ||
| shell: bash | ||
| run: npm run test-ci | ||
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.
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.
Warning · ci
node-version: [latest]is a floating alias, not Node 27, yet this workflow exists to test Node 27 (PR title: 'build with node v27'). Nothing in the job checks which version was installed: the 'Output Node and NPM versions' step only echoesnode -v. setup-node'slatestnormally resolves to the newest stable release, and only the comment on lines 33-36 says it currently picks the Alpha. Iflatestresolves to stable, this job repeats the Node 26 run already in ci.yml (line 49) and still passes. It reports nothing about 27, and withcontinue-on-error: truenobody would notice. It will also drift to 27.0.0 stable and then 28 with no change to this file, and the job label will just read 'latest'. Note that the reviewers' suggested pins (27.0.0-alpha) are the very values the comment says setup-node does not accept yet, so add a version guard instead. Also confirm from a run log that v27.x is installed. The PR description itself suggests waiting for setup-node support.code-check · architect, pragmatist, skeptic
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for the review. You're right that latest is a floating alias and nothing in the job verifies that Node 27 was actually installed so this could silently run on stable and still pass.
suggestion replaces line 37
node-version: [latest]which sits inside thematrix: block. That would put a step into the matrix and removematrix.node-versionwhich the job name and the setup-node step both use. I've kept the matrix as it is and added the same assertion as a separate step right after setup-node so the job fails if the installed major version isn't 27.I'm keeping latest for now because 27,
27.0.0and27.0.0-alphaaren't accepted by setup-node actions/setup-node#1657 so pinning isn't an option. The comment in the matrix explains this and I'll switch tonode-version: 27and drop the guard once that's supported.