Skip to content

Commit b14b777

Browse files
committed
Update cypress CI
1 parent 36bc33f commit b14b777

File tree

2 files changed

+7332
-7539
lines changed

2 files changed

+7332
-7539
lines changed

.github/workflows/cypress-run.yml

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,37 @@ name: cypress-run
22
on: push
33
jobs:
44
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 test:e2e
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: "12.x"
21+
- name: Install dependencies
22+
run: yarn
23+
- name: Browser tests
24+
uses: cypress-io/github-action@v2
25+
with:
26+
# Your starting script
27+
test: 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@v1
35+
if: failure()
36+
with:
37+
name: cypress-videos
38+
path: cypress/videos

0 commit comments

Comments
 (0)