-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (47 loc) · 1.65 KB
/
continous_integration.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
name: Continuous Integration
on: [pull_request]
jobs:
Validate:
name: 'Validate Pull Request'
runs-on: ubuntu-latest
env:
NODE_VERSION: '12.x'
steps:
- name: 'Git checkout'
uses: actions/checkout@v2
# Beginning of yarn setup, keep in sync between all workflows
- name: Use node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: 'Use cached node_modules'
id: cache-modules
uses: actions/[email protected]
with:
path: '**/node_modules'
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
- name: 'Find location of global yarn cache'
id: yarn-cache
if: steps.cache-modules.outputs.cache-hit != 'true'
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: 'Cache global yarn cache'
uses: actions/[email protected]
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 'Install dependency'
run: yarn install --frozen-lockfile
# End of yarn setup
- name: 'Audit dependencies'
run: /bin/sh -c 'yarn audit --level high; [[ $? -ge 8 ]] && exit 1 || exit 0'
- name: 'Types check'
run: yarn type-check
- name: 'Prettier'
run: yarn format:check
- name: 'ESLint'
run: yarn lint
- name: 'Build'
run: yarn build