-
Notifications
You must be signed in to change notification settings - Fork 432
59 lines (49 loc) · 1.59 KB
/
test_e2e.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: End-to-end tests
on: [push]
jobs:
e2e:
name: End-to-end tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v2
env:
# added -vX just to reset the cache, feel free to up it if you need
# to reset the cache again
cache-name: cache-node-modules-v4
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install npm dependencies
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
run: npm install
- name: Build monorepo packages
run: npm run build
- name: Run cypress
run: npm run test-e2e
env:
CYPRESS_SANITY_SESSION_TOKEN: ${{ secrets.CYPRESS_SANITY_SESSION_TOKEN }}
- name: Archive videos
uses: actions/upload-artifact@v2
with:
name: videos
path: cypress/videos
# Make sure this step runs even though the test steps fails.
# Otherwise we won't get videos if tests fail.
if: ${{ always() }}
- name: Archive screenshots
uses: actions/upload-artifact@v2
with:
name: screenshots
path: cypress/screenshots
# Make sure this step runs even though the test steps fails.
# Otherwise we won't get videos if tests fail.
if: ${{ always() }}