Skip to content
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

update ci example workflows to use Node.js 20.x LTS #5545

Merged
merged 1 commit into from
Oct 30, 2023
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
8 changes: 5 additions & 3 deletions docs/guides/continuous-integration/aws-codebuild.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ offers a way to specify an image hosted on DockerHub or the

The Cypress team maintains the official
[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running
Cypress locally and in CI, which are built with Google Chrome and Firefox. For
Cypress locally and in CI, which are built with Google Chrome, Firefox and Microsoft Edge. For
example, this allows us to run the tests in Firefox by passing the
`--browser firefox` attribute to `cypress run`.

Expand Down Expand Up @@ -180,13 +180,15 @@ version: 0.2

## AWS CodeBuild Batch configuration
## https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html
## Define build to run using the "cypress/browsers:node18.12.0-chrome106-ff106" image from the Cypress Amazon ECR Public Gallery
## Define build to run using the
## "cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1" image
## from the Cypress Amazon ECR Public Gallery
batch:
fast-fail: false
build-list:
- identifier: cypress-e2e-tests
env:
image: public.ecr.aws/cypress-io/cypress/browsers:node18.12.0-chrome106-ff106
image: public.ecr.aws/cypress-io/cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1

phases:
install:
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/continuous-integration/bitbucket-pipelines.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ example, this allows us to run the tests in Firefox by passing the
`--browser firefox` attribute to `cypress run`.

```yaml
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1

pipelines:
default:
Expand Down Expand Up @@ -89,7 +89,7 @@ Artifacts from a job can be defined by providing paths to the `artifacts`
attribute.

```yaml
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1

pipelines:
default:
Expand Down Expand Up @@ -153,7 +153,7 @@ recording test results to [Cypress Cloud](/guides/cloud/introduction).
:::

```yaml
image: cypress/base:18.12.1
image: cypress/base:20.9.0

## job definition for running E2E tests in parallel
e2e: &e2e
Expand Down Expand Up @@ -212,7 +212,7 @@ definitions:
The complete `bitbucket-pipelines.yml` is below:

```yaml
image: cypress/base:18.12.1
image: cypress/base:20.9.0

## job definition for running E2E tests in parallel
e2e: &e2e
Expand Down
6 changes: 4 additions & 2 deletions docs/guides/continuous-integration/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ Cypress locally and in CI.

Below we extend the previous example by adding the `container` attribute using a
[Cypress Docker Image](https://github.com/cypress-io/cypress-docker-images)
built with Google Chrome `106`. Specifying a browser version allows our tests to
built with the version of Google Chrome embedded in the tag name of the Docker image
shown as `chrome-xxx`.
Specifying a browser version allows our tests to
execute without any influence from browser version changes in the GitHub runner
image.

Expand All @@ -186,7 +188,7 @@ jobs:
cypress-run:
runs-on: ubuntu-22.04
container:
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
options: --user 1001
steps:
- name: Checkout
Expand Down
22 changes: 12 additions & 10 deletions docs/guides/continuous-integration/gitlab-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ example project and place the above GitHub Action configuration in

The Cypress team maintains the official
[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running
Cypress tests locally and in CI, which are built with Google Chrome and Firefox.
Cypress tests locally and in CI, which are built with Google Chrome, Firefox and Microsoft Edge.
For example, this allows us to run the tests in Firefox by passing the
`--browser firefox` attribute to `cypress run`.

Expand All @@ -78,7 +78,7 @@ stages:
- test

test:
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
stage: test
script:
# install dependencies
Expand Down Expand Up @@ -109,7 +109,7 @@ cache:
- .npm/

test:
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
stage: test
script:
# install dependencies
Expand Down Expand Up @@ -161,7 +161,8 @@ assign it to the `build` stage.
stages:
- build

## Set environment variables for folders in "cache" job settings for npm modules and Cypress binary
## Set environment variables for folders in "cache" job settings
## for npm modules and Cypress binary
variables:
npm_config_cache: '$CI_PROJECT_DIR/.npm'
CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
Expand All @@ -173,9 +174,9 @@ cache:
- node_modules
- build

## Install NPM dependencies and Cypress
## Install npm dependencies and Cypress
install:
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
stage: build
script:
- npm ci
Expand Down Expand Up @@ -204,7 +205,8 @@ stages:
- build
- test

## Set environment variables for folders in "cache" job settings for npm modules and Cypress binary
## Set environment variables for folders in "cache" job settings
## for npm modules and Cypress binary
variables:
npm_config_cache: '$CI_PROJECT_DIR/.npm'
CYPRESS_CACHE_FOLDER: '$CI_PROJECT_DIR/cache/Cypress'
Expand All @@ -217,15 +219,15 @@ cache:
- node_modules
- build

## Install NPM dependencies and Cypress
## Install npm dependencies and Cypress
install:
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
stage: build
script:
- npm ci

ui-chrome-tests:
image: cypress/browsers:node18.12.0-chrome106-ff106
image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
stage: test
parallel: 5
script:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/continuous-integration/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ Mounting a project directory with an existing `node_modules` into a
`cypress/base` docker image **will not work**:

```shell
docker run -it -v /app:/app cypress/base:18.12.1 bash -c 'cypress run'
docker run -it -v /app:/app cypress/base:20.9.0 bash -c 'cypress run'
Error: the cypress binary is not installed
```

Expand Down