Skip to content

Commit 507496f

Browse files
authored
Update Docker use description in GitHub Actions (#6173)
1 parent f7a4823 commit 507496f

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

docs/app/continuous-integration/github-actions.mdx

+26-14
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,20 @@ Cypress offers various
171171
[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running
172172
Cypress locally and in CI.
173173

174-
Below we extend the previous example by adding the `container` attribute using a
175-
[Cypress Docker Image](https://github.com/cypress-io/cypress-docker-images)
176-
built with the version of Google Chrome embedded in the tag name of the Docker image
177-
shown as `chrome-xxx`.
178-
Specifying a browser version allows our tests to
179-
execute without any influence from browser version changes in the GitHub runner
180-
image.
174+
Note that GitHub Actions
175+
[requires using a Linux runner](https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#jobsjob_idcontainer) when specifying a container image.
176+
It does not support running Docker images on Windows or macOS runners.
177+
178+
Below, we extend the previous example by adding the `container` attribute using a
179+
[cypress/browsers](https://github.com/cypress-io/cypress-docker-images/tree/master/browsers)
180+
Docker image which also includes Google Chrome.
181+
We are using the Node.js short-form tag to select a `cypress/browsers` image
182+
built with the corresponding Node.js version.
183+
To specify instead an exact set of browser versions, visit the
184+
[Docker Hub cypress/browsers](https://hub.docker.com/r/cypress/browsers) page and view the available long-form tags,
185+
for example `cypress/browsers:node-22.15.0-chrome-136.0.7103.92-1-ff-138.0.1-edge-136.0.3240.50-1`.
186+
Using a Cypress Docker image allows our tests to execute without any influence from
187+
browser version changes in the GitHub runner image.
181188

182189
```yaml
183190
name: Cypress Tests using Cypress Docker Image
@@ -417,14 +424,19 @@ aren't used in the steps.
417424

418425
### Specifying Browsers in Parallel Builds
419426

420-
If you specify a browser in parallel mode, we recommend using a
421-
[Cypress Docker image](#Testing-with-Cypress-Docker-Images) to pin the browser
422-
version used.
427+
When GitHub deploys new runner image versions containing updated browser versions,
428+
and the deployment is still in progress,
429+
the workflow "Set up job" phase randomly uses either an old or a new runner image version.
430+
Your test run might fail if Cypress Cloud detects differences in the browser versions between parallel jobs.
423431

424-
When GitHub updates the browsers in their runner images, not all runners get the
425-
new version simultaneously. Your test run might fail if Cypress Cloud detects
426-
differences in the runners between parallel jobs. The Docker image helps ensure
427-
the browser is consistent during an image upgrade.
432+
To work around this issue,
433+
and if you specify a browser other than the default Electron browser in parallel mode,
434+
we recommend using a
435+
[cypress/browsers](#Testing-with-Cypress-Docker-Images) Docker image which then uses one consistent browser version.
436+
This shields the workflow from browser version changes due to possible incomplete GitHub runner image deployments.
437+
438+
As mentioned in [Testing with Cypress Docker Images](#Testing-with-Cypress-Docker-Images),
439+
this option is only available with GitHub Actions Linux runners.
428440

429441
## Using Cypress Cloud with GitHub Actions
430442

0 commit comments

Comments
 (0)