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