@@ -2,31 +2,37 @@ name: cypress-run
2
2
on : push
3
3
jobs :
4
4
cypress-run :
5
- runs-on : ubuntu-latest
6
- # Browser on which the tests are run
7
- container : cypress/browsers:node12.18.3-chrome87-ff82
8
- steps :
9
- - name : Checkout
10
- uses : actions/checkout@v2
11
- - name : Setup node
12
- uses : actions/setup-node@v1
13
- with :
14
- node-version : ' 12.x'
15
- - name : Install dependencies
16
- run : yarn
17
- - name : Browser tests
18
- uses : cypress-io/github-action@v2
19
- with :
20
- # Your starting script
21
- start : yarn start:test-headless
22
- # Creates and uploads GitHub artifacts in case of failure
23
- - uses : actions/upload-artifact@v1
24
- if : failure()
25
- with :
26
- name : cypress-screenshots
27
- path : cypress/screenshots
28
- - uses : actions/upload-artifact@v1
29
- if : failure()
30
- with :
31
- name : cypress-videos
32
- path : cypress/videos
5
+ runs-on : ubuntu-latest
6
+ # Browser on which the tests are run
7
+ container : cypress/browsers:node12.18.3-chrome87-ff82
8
+ steps :
9
+ - name : Checkout
10
+ uses : actions/checkout@v2
11
+ - name : Cache dependencies
12
+ uses : actions/cache@v2
13
+ with :
14
+ path : |
15
+ ./node_modules
16
+ key : ${{ hashFiles('yarn.lock') }}
17
+ - name : Setup node
18
+ uses : actions/setup-node@v1
19
+ with :
20
+ node-version : " 16.x"
21
+ - name : Install dependencies
22
+ run : yarn --dev && yarn --cwd ./playgrounds/html
23
+ - name : Browser tests
24
+ uses : cypress-io/github-action@v2
25
+ with :
26
+ # Your starting script
27
+ start : yarn playground
28
+ # Creates and uploads GitHub artifacts in case of failure
29
+ - uses : actions/upload-artifact@v1
30
+ if : failure()
31
+ with :
32
+ name : cypress-screenshots
33
+ path : cypress/screenshots
34
+ - uses : actions/upload-artifact@v2
35
+ if : failure()
36
+ with :
37
+ name : cypress-videos
38
+ path : cypress/videos
0 commit comments