Skip to content

Commit d8d32b1

Browse files
authored
Merge pull request #5155 from MikeMcC399/gha/browser-testing
Add GitHub installed browsers
2 parents 55eac7d + 57dc595 commit d8d32b1

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,31 @@ example project and place the above GitHub Action configuration in
129129
- Start the project web server (`npm start`)
130130
- Run the Cypress tests within our GitHub repository within Electron.
131131

132+
## Testing on GitHub with Installed Browsers
133+
134+
[GitHub-hosted runners](https://github.com/actions/runner-images) offer images
135+
with pre-installed browsers to use for testing. The `ubuntu` and `windows`
136+
runners each include Google Chrome, Mozilla Firefox and Microsoft Edge
137+
pre-installed. The `macos` runners additionally include Apple Safari. Refer to
138+
[GitHub Actions Runner Images](https://github.com/actions/runner-images/blob/main/README.md)
139+
for current details.
140+
141+
Use the action's `browser` parameter to select the desired browser. To change
142+
the above example to select Chrome instead of the default browser Electron, add
143+
`browser: chrome` as follows.
144+
145+
```yaml
146+
- name: Cypress run
147+
uses: cypress-io/github-action@v5
148+
with:
149+
build: npm run build
150+
start: npm start
151+
browser: chrome
152+
```
153+
154+
For more examples, see the action's
155+
[Browser](https://github.com/cypress-io/github-action#browser) section.
156+
132157
## Testing in Chrome and Firefox with Cypress Docker Images
133158

134159
GitHub Actions provides the option to specify a container image for the job.

0 commit comments

Comments
 (0)