Skip to content
Merged
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
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
node: [20, 24]
continue-on-error: ${{ matrix.node == 24 }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -17,7 +21,7 @@ jobs:
- name: Setup Nodejs
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: ${{ matrix.node }}
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep the standard of using the .nvmrc file for the base version and add another conditional step in case of Node 24 to use the value from matrix.
In future, when Node 20 support is removed, .nvmrc will be retained as the source of truth as per the decision made by the frontend community some time ago.

We can do conditional setup to maintain nvmrc functionality while adding support to test new version:

# Use .nvmrc if matrix.node == 20
- name: Setup Node.js from .nvmrc
  uses: actions/setup-node@v4
  if: matrix.node == 20
  with:
    node-version-file: '.nvmrc'

# Use matrix.node otherwise
- name: Setup Node.js from matrix
  uses: actions/setup-node@v4
  if: matrix.node != 20
  with:
    node-version: ${{ matrix.node }}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When upgrading Node, we have a series of PRs. The final one, which updates the .nvmrc file, is the single source of truth for the new Node version.

The tracking issue: #657

- name: Install dependencies
run: npm ci
- name: Lint
Expand Down