-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (67 loc) · 1.67 KB
/
lint-and-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
name: Linting and Testing
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_ENV: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
key: v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-
- name: Install dependencies with yarn
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install
lint:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
key: v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-
- name: Run Linter
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: yarn lint
test:
runs-on: ubuntu-latest
needs: build
env:
NODE_ENV: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/cache@v2
id: yarn-cache
with:
path: node_modules
key: v1-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-
- name: Run Server Tests
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: yarn test:server
- name: Run UI Tests
if: steps.yarn-cache.outputs.cache-hit == 'true'
run: yarn test:client