Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/alpha.yml
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]

Copy link
Copy Markdown

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 echoes node -v. setup-node's latest normally resolves to the newest stable release, and only the comment on lines 33-36 says it currently picks the Alpha. If latest resolves to stable, this job repeats the Node 26 run already in ci.yml (line 49) and still passes. It reports nothing about 27, and with continue-on-error: true nobody 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.

Suggested change
node-version: [latest]
- 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) }"

code-check · architect, pragmatist, skeptic

@shivarm shivarm Nov 21, 2026 •

Copy link
Copy Markdown
Contributor Author

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 the matrix: block. That would put a step into the matrix and remove matrix.node-version which 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.0 and 27.0.0-alpha aren'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 to node-version: 27 and drop the guard once that's supported.


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