-
Notifications
You must be signed in to change notification settings - Fork 13
74 lines (71 loc) · 2.15 KB
/
test.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
name: Test
on:
push:
env:
NODE_ENV: test
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
PERCY_PARALLEL_NONCE: ${{ github.run_id }}
PERCY_PARALLEL_TOTAL: 10
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
ALGOLIA_ADMIN_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
FIREBASE_ADMIN_CLIENT_EMAIL: ${{ secrets.FIREBASE_ADMIN_CLIENT_EMAIL }}
FIREBASE_ADMIN_KEY: ${{ secrets.FIREBASE_ADMIN_KEY }}
INTERCOM_KEY: ${{ secrets.INTERCOM_KEY }}
REMIND_TOKEN: ${{ secrets.REMIND_TOKEN }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/cache@v2
with:
path: |
~/.cache/firebase/emulators
~/.cache/Cypress
~/.cache/yarn
.next/cache
node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --immutable --immutable-cache
- run: yarn build
- uses: actions/upload-artifact@v2
with:
name: build
path: |
.next
public/sw.js
test:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chrome]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/download-artifact@v2
with:
name: build
- uses: actions/cache@v2
with:
path: |
~/.cache/firebase/emulators
~/.cache/Cypress
~/.cache/yarn
.next/cache
node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --immutable --immutable-cache
- run: yarn start & yarn wait-on http-get://localhost:3000
- run: yarn start:cy --record --parallel --headless --group ${{ matrix.browser }} -b ${{ matrix.browser }}
- uses: codecov/codecov-action@v1
if: ${{ success() || failure() }}