forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (62 loc) · 2.14 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: example-chrome
on: [push]
jobs:
tests:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress info
uses: ./
with:
# just for full picture after installing Cypress
# print information about detected browsers, etc
# see https://on.cypress.io/command-line#cypress-info
build: npx cypress info
working-directory: examples/chrome
- name: Electron
uses: ./
with:
working-directory: examples/chrome
# store screenshot captured during the test
- uses: actions/upload-artifact@v2
with:
name: screenshots-in-electron
path: examples/chrome/cypress/screenshots
- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/chrome
- name: Chrome
uses: ./
with:
working-directory: examples/chrome
browser: chrome
- uses: actions/upload-artifact@v2
with:
name: screenshots-in-chrome
path: examples/chrome/cypress/screenshots
- uses: actions/upload-artifact@v2
with:
name: video-in-chrome
path: examples/chrome/cypress/videos
- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/chrome
# I wonder if GH Actions VM includes any of the tools that
# can tell us the resolution of a video file
- run: ffprobe cypress/videos/*.mp4 || true
- run: mplayer -really-quiet -ao null -vo null -identify -frames 0 cypress/videos/*.mp4 || true
- name: Chrome headless
uses: ./
with:
working-directory: examples/chrome
browser: chrome
headless: true
- uses: actions/upload-artifact@v2
with:
name: screenshots-in-headless-chrome
path: examples/chrome/cypress/screenshots
- uses: actions/upload-artifact@v2
with:
name: video-in-headless-chrome
path: examples/chrome/cypress/videos
- run: npx image-size cypress/screenshots/**/*.png
working-directory: examples/chrome