3
3
4
4
name : CI
5
5
6
- on :
7
- pull_request :
8
- push :
9
- branches :
10
- - main
6
+ on : [push, pull_request]
11
7
12
8
jobs :
13
9
lint :
@@ -19,38 +15,36 @@ jobs:
19
15
runs-on : ${{ matrix.os }}
20
16
steps :
21
17
- name : Checkout the repository
22
- uses : actions/checkout@v2
23
- - name : Setup Node ${{ matrix.node-version }}
24
- uses : actions/setup-node@v2
18
+ uses : actions/checkout@v3
19
+ - name : Use Node ${{ matrix.node-version }}
20
+ uses : actions/setup-node@v3
25
21
with :
26
22
node-version : ${{ matrix.node-version }}
27
- registry-url : ' https://registry.npmjs.org/'
28
23
- name : Check for lint/formatting errors
29
24
run : |
30
25
npm ci
31
26
npm run lint
32
- test :
33
- name : Test
27
+ test-library :
28
+ name : Test (Library)
34
29
strategy :
35
30
matrix :
36
31
node-version : [lts/gallium, lts/*, latest]
37
32
os : [ubuntu-latest, windows-latest, macos-latest]
38
33
runs-on : ${{ matrix.os }}
39
34
steps :
40
35
- name : Checkout the repository
41
- uses : actions/checkout@v2
42
- - name : Setup Node ${{ matrix.node-version }}
43
- uses : actions/setup-node@v2
36
+ uses : actions/checkout@v3
37
+ - name : Use Node ${{ matrix.node-version }}
38
+ uses : actions/setup-node@v3
44
39
with :
45
40
node-version : ${{ matrix.node-version }}
46
- registry-url : ' https://registry.npmjs.org/'
47
41
- name : Run library tests
48
42
run : |
49
43
npm ci
50
- npm test:lib
44
+ npm run test:lib
51
45
publish :
52
46
name : Publish
53
- needs : [lint, test]
47
+ needs : [lint, test-library ]
54
48
if : startsWith(github.ref, 'refs/tags/v')
55
49
runs-on : ubuntu-latest
56
50
steps :
0 commit comments