@@ -154,18 +154,18 @@ the above example to select Chrome instead of the default browser Electron, add
154154For more examples, see the action's
155155[Browser](https://github.com/cypress-io/github-action#browser) section.
156156
157- # # Testing in Chrome and Firefox with Cypress Docker Images
157+ # # Testing with Cypress Docker Images
158158
159159GitHub Actions provides the option to specify a container image for the job.
160160Cypress offers various
161161[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running
162162Cypress locally and in CI.
163163
164- Below we add the `container` attribute using a
164+ Below we extend the previous example by adding the `container` attribute using a
165165[Cypress Docker Image](https://github.com/cypress-io/cypress-docker-images)
166- built with Google Chrome and Firefox. For example, this allows us to run the
167- tests in Firefox by passing the ` browser: firefox` attribute to the
168- [Cypress GitHub Action](https://github.com/marketplace/actions/cypress-io) .
166+ built with Google Chrome `107`. This allows us to fix our test to a specific
167+ browser version without any influence due to browser version changes in the
168+ GitHub runner image .
169169
170170` ` ` yaml
171171name: Cypress Tests using Cypress Docker Image
@@ -175,18 +175,16 @@ on: push
175175jobs:
176176 cypress-run:
177177 runs-on: ubuntu-22.04
178- container: cypress/browsers:node12.18.3-chrome87-ff82
178+ container: cypress/browsers:node18.12.0-chrome107
179179 steps:
180180 - name: Checkout
181181 uses: actions/checkout@v3
182-
183- # Install NPM dependencies, cache them correctly
184- # and run all Cypress tests
185182 - name: Cypress run
186183 uses: cypress-io/github-action@v5
187184 with:
188- # Specify Browser since container image is compiled with Firefox
189- browser: firefox
185+ build: npm run build
186+ start: npm start
187+ browser: chrome
190188` ` `
191189
192190# # Caching Dependencies and Build Artifacts
0 commit comments