File tree Expand file tree Collapse file tree 2 files changed +77
-24
lines changed Expand file tree Collapse file tree 2 files changed +77
-24
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : CI
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - 5.x
8
+
9
+ env :
10
+ NODE_VERSION : 16
11
+
12
+ jobs :
13
+ tests :
14
+ strategy :
15
+ matrix :
16
+ node : [ '12', '14', '16' ]
17
+ name : Unit tests (Node v${{ matrix.node }})
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - name : Checkout
22
+ uses : actions/checkout@v2
23
+
24
+ - name : Setup Node.js
25
+ uses : actions/setup-node@v2
26
+ with :
27
+ node-version : ${{ matrix.node }}
28
+ cache : ' yarn'
29
+
30
+ - name : Cache node_modules
31
+ uses : actions/cache@v2
32
+ id : cache-nodemodules
33
+ with :
34
+ path : node_modules
35
+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
36
+
37
+ - name : Install dependencies
38
+ if : steps.cache-nodemodules.outputs.cache-hit != 'true'
39
+ run : yarn install --frozen-lockfile --non-interactive
40
+
41
+ - name : Build
42
+ run : yarn build
43
+
44
+ - name : Unit tests
45
+ run : yarn test --ci
46
+
47
+ lint :
48
+ name : Lint
49
+ runs-on : ubuntu-latest
50
+
51
+ steps :
52
+ - name : Checkout
53
+ uses : actions/checkout@v2
54
+
55
+ - name : Setup Node.js
56
+ uses : actions/setup-node@v2
57
+ with :
58
+ node-version : ${{ env.NODE_VERSION }}
59
+ cache : ' yarn'
60
+
61
+ - name : Cache node_modules
62
+ uses : actions/cache@v2
63
+ id : cache-nodemodules
64
+ with :
65
+ path : node_modules
66
+ key : ${{ runner.os }}-${{ env.NODE_VERSION }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
67
+
68
+ - name : Install dependencies
69
+ if : steps.cache-nodemodules.outputs.cache-hit != 'true'
70
+ run : yarn install --frozen-lockfile --non-interactive
71
+
72
+ - name : Install website dependencies
73
+ run : yarn install --frozen-lockfile --non-interactive
74
+ working-directory : ./website
75
+
76
+ - name : Lint
77
+ run : yarn lint
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments