This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.79 KB
/
example-chrome.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: example-chrome
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Chrome headless
uses: ./
with:
# Print information about the system and current environment
# including detected browsers
# which are pre-installed in GitHub-hosted runners
# see https://on.cypress.io/command-line#cypress-info
# We do not need the build parameter to build an app here
# because the remote https://example.cypress.io site
# is already built and running, and so for convenience
# we repurpose the build parameter to get cypress info instead.
build: npx cypress info
working-directory: examples/browser
browser: chrome
summary-title: 'Chrome headless'
# As of Cypress v8.0 the `cypress run` command
# executes tests in `headless` mode by default
- uses: actions/upload-artifact@v4
with:
name: screenshots-headless-chrome
path: examples/browser/cypress/screenshots
- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/browser
- name: Chrome headed
uses: ./
with:
# Cypress and dependencies are already installed
install: false
working-directory: examples/browser
browser: chrome
headed: true
summary-title: 'Chrome headed'
- uses: actions/upload-artifact@v4
with:
name: screenshots-headed-chrome
path: examples/browser/cypress/screenshots
- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/browser