@@ -154,18 +154,18 @@ the above example to select Chrome instead of the default browser Electron, add
154
154
For more examples, see the action's
155
155
[Browser](https://github.com/cypress-io/github-action#browser) section.
156
156
157
- # # Testing in Chrome and Firefox with Cypress Docker Images
157
+ # # Testing with Cypress Docker Images
158
158
159
159
GitHub Actions provides the option to specify a container image for the job.
160
160
Cypress offers various
161
161
[Docker Images](https://github.com/cypress-io/cypress-docker-images) for running
162
162
Cypress locally and in CI.
163
163
164
- Below we add the `container` attribute using a
164
+ Below we extend the previous example by adding the `container` attribute using a
165
165
[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 .
169
169
170
170
` ` ` yaml
171
171
name: Cypress Tests using Cypress Docker Image
@@ -175,18 +175,16 @@ on: push
175
175
jobs:
176
176
cypress-run:
177
177
runs-on: ubuntu-22.04
178
- container: cypress/browsers:node12.18.3-chrome87-ff82
178
+ container: cypress/browsers:node18.12.0-chrome107
179
179
steps:
180
180
- name: Checkout
181
181
uses: actions/checkout@v3
182
-
183
- # Install NPM dependencies, cache them correctly
184
- # and run all Cypress tests
185
182
- name: Cypress run
186
183
uses: cypress-io/github-action@v5
187
184
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
190
188
` ` `
191
189
192
190
# # Caching Dependencies and Build Artifacts
0 commit comments