-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (54 loc) · 1.86 KB
/
test_frontend.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
name: Test Frontend
on:
push:
branches: [main]
paths:
- '.github/workflows/test_frontend.yml'
- 'frontend/**/*'
pull_request:
branches: [main, staging]
paths:
- '.github/workflows/test_frontend.yml'
- 'frontend/**/*'
jobs:
test:
strategy:
fail-fast: false
matrix:
node-version: [14.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: |
**/node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Run tests
run: |
cd frontend
yarn install
yarn test:ci
env:
SKIP_PREFLIGHT_CHECK: 'true'
REACT_APP_BACKEND_API: http://localhost:4000
REACT_APP_FIREBASE_API_KEY: AIzaSyASaqw4fLp2DYyfmVRfQojpXcvFzlcVKs8
REACT_APP_FIREBASE_AUTH_DOMAIN: code2gather-df5c6.firebaseapp.com
REACT_APP_FIREBASE_PROJECT_ID: code2gather-df5c6
REACT_APP_FIREBASE_STORAGE_BUCKET: code2gather-df5c6.appspot.com
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: 333844889339
REACT_APP_FIREBASE_APP_ID: 1:333844889339:web:e8aee02dd38ceceefd3a5e
REACT_APP_FIREBASE_MEASUREMENT_ID: G-MFN27CTW6J
REACT_APP_AGORA_APP_ID: 6e61da63d86d4d96951c2d27054273b1