This repository has been archived by the owner on May 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
73 lines (58 loc) · 1.55 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
name: Test CI
on:
push:
branches:
- master
pull_request:
env:
CI: true
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Init platform
id: init
shell: bash
run: |
echo "::set-output name=yarn_cache::$(yarn cache dir)"
node --version
yarn --version
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache Yarn packages
uses: actions/cache@v1
with:
path: ${{ steps.init.outputs.yarn_cache }}
key: ${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn_cache-
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-yarn-
- name: Installing dependencies
shell: bash
run: |
yarn install --frozen-lockfile --link-duplicates
- name: Build
run: yarn build
- name: Lint
run: yarn lint
- name: Prettier
run: yarn prettier
- name: Validate
run: yarn validate