-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (58 loc) · 2.23 KB
/
example-chrome.yml
File metadata and controls
66 lines (58 loc) · 2.23 KB
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
60
61
62
63
64
65
66
name: example-chrome
# In the example jobs, the action is called with
# uses: ./
# which runs the action code from the current branch.
# If you copy this workflow to another repo, replace the line with
# uses: step-security/cypress-io-github-action@v7
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-24.04
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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'
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: screenshots-headed-chrome
path: examples/browser/cypress/screenshots
- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/browser