Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions .github/workflows/example-cypress-github-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
options: --user 1001
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- uses: cypress-io/github-action@v6
with:
# Only the Electron browser is available with cypress/base
Expand All @@ -47,6 +50,9 @@ jobs:
options: --user 1001
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- uses: cypress-io/github-action@v6
with:
working-directory: examples/basic
Expand All @@ -68,6 +74,9 @@ jobs:
options: --user 1001
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- uses: cypress-io/github-action@v6
with:
# Using Cypress project with no Cypress version pre-installed
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/example-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
- name: Run test script
working-directory: examples/${{ matrix.directory }}
run: ./scripts/test.sh
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.19.0
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22.19.0
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,14 @@ In CI, the images are built and tested in real `arm64` and `x64` architectures.
│ └──────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
```

## Node.js

The version of Node.js to be used in GitHub Actions workflows, and when running locally, is defined in [.node-version](.node-version).
This version is aligned with the Node.js version provided by the CircleCI machine image used in the config [circle.yml](circle.yml).
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).
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).

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.

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.
12 changes: 12 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ commands:
circleci-agent step halt
fi

# Available CircleCI Ubuntu machine images are listed in
# https://circleci.com/developer/images?imageType=machine
# ubuntu-2404 images are listed under
# https://circleci.com/developer/machine/image/ubuntu-2404
# New releases are generally announced in https://discuss.circleci.com/c/ecosystem/63
#
# The currently used image ubuntu-2404:2025.09.1 is described in
# https://discuss.circleci.com/t/ubuntu-22-04-24-04-q3-edge-release-including-cuda/54106
#
# When updating the machine image, update also .node-version and .nvmrc to the same version of Node.js
# used by the new machine image.

jobs:
lint:
machine:
Expand Down