Skip to content

Commit 4c0931c

Browse files
authored
chore(deps): harmonize Node.js to 22.19.0 from CircleCI image (#1450)
1 parent 1fa0825 commit 4c0931c

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

.github/workflows/example-cypress-github-action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
options: --user 1001
2626
steps:
2727
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version-file: '.node-version'
2831
- uses: cypress-io/github-action@v6
2932
with:
3033
# Only the Electron browser is available with cypress/base
@@ -47,6 +50,9 @@ jobs:
4750
options: --user 1001
4851
steps:
4952
- uses: actions/checkout@v4
53+
- uses: actions/setup-node@v4
54+
with:
55+
node-version-file: '.node-version'
5056
- uses: cypress-io/github-action@v6
5157
with:
5258
working-directory: examples/basic
@@ -68,6 +74,9 @@ jobs:
6874
options: --user 1001
6975
steps:
7076
- uses: actions/checkout@v4
77+
- uses: actions/setup-node@v4
78+
with:
79+
node-version-file: '.node-version'
7180
- uses: cypress-io/github-action@v6
7281
with:
7382
# Using Cypress project with no Cypress version pre-installed

.github/workflows/example-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
runs-on: ${{ matrix.os }}
3232
steps:
3333
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version-file: '.node-version'
3437
- name: Run test script
3538
working-directory: examples/${{ matrix.directory }}
3639
run: ./scripts/test.sh

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.19.0

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.19.0

CONTRIBUTING.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,14 @@ In CI, the images are built and tested in real `arm64` and `x64` architectures.
207207
│ └──────────────────────────────────────┘ │
208208
└─────────────────────────────────────────────┘
209209
```
210+
211+
## Node.js
212+
213+
The version of Node.js to be used in GitHub Actions workflows, and when running locally, is defined in [.node-version](.node-version).
214+
This version is aligned with the Node.js version provided by the CircleCI machine image used in the config [circle.yml](circle.yml).
215+
You can find a list of tools on [node-version-usage](https://github.com/shadowspawn/node-version-usage) to switch the version of Node.js based on [.node-version](.node-version).
216+
For convenience, [.nvmrc](.nvmrc) also contains an identical setting of Node.js version for use with the POSIX version of [nvm](https://github.com/nvm-sh/nvm).
217+
218+
If the CircleCI machine image in [circle.yml](circle.yml) is updated, then [.node-version](.node-version) and [.nvmrc](.nvmrc) should also be updated to use the same version of Node.js throughout.
219+
220+
This is separate from the version of Node.js to be installed and used within Cypress Docker images, which is defined in the [factory NODE_VERSION](./factory/README.md#node_version) document section.

circle.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ commands:
4949
circleci-agent step halt
5050
fi
5151
52+
# Available CircleCI Ubuntu machine images are listed in
53+
# https://circleci.com/developer/images?imageType=machine
54+
# ubuntu-2404 images are listed under
55+
# https://circleci.com/developer/machine/image/ubuntu-2404
56+
# New releases are generally announced in https://discuss.circleci.com/c/ecosystem/63
57+
#
58+
# The currently used image ubuntu-2404:2025.09.1 is described in
59+
# https://discuss.circleci.com/t/ubuntu-22-04-24-04-q3-edge-release-including-cuda/54106
60+
#
61+
# When updating the machine image, update also .node-version and .nvmrc to the same version of Node.js
62+
# used by the new machine image.
63+
5264
jobs:
5365
lint:
5466
machine:

0 commit comments

Comments
 (0)