13
13
jobs :
14
14
lint :
15
15
name : Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}
16
-
17
16
env :
18
17
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
19
-
20
18
strategy :
21
19
matrix :
22
20
os : [ubuntu-latest]
23
21
node-version : [lts/*]
24
-
25
22
runs-on : ${{ matrix.os }}
26
-
27
23
concurrency :
28
24
group : lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
29
25
cancel-in-progress : true
30
-
31
26
steps :
32
27
- uses : actions/checkout@v4
33
28
with :
34
29
fetch-depth : 0
35
-
36
30
- name : Use Node.js ${{ matrix.node-version }}
37
31
uses : actions/setup-node@v4
38
32
with :
39
33
node-version : ${{ matrix.node-version }}
40
34
cache : " npm"
41
-
42
35
- name : Install dependencies
43
36
run : npm ci
44
-
45
37
- name : Lint
46
38
run : npm run lint
47
-
48
39
- name : Build declarations
49
40
run : npm run build:types
50
-
51
41
- name : Run lint declarations
52
42
run : if [ -n "$(git status declarations --porcelain)" ]; then echo "Missing declarations in git"; exit 1; else echo "All declarations are valid"; fi
53
-
54
43
- name : Security audit
55
44
run : npm run security
56
-
57
45
- name : Check commit message
58
46
uses : wagoid/commitlint-github-action@v4
59
-
60
47
test :
61
48
name : Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}
62
-
63
49
strategy :
64
50
matrix :
65
51
os : [ubuntu-latest, windows-latest, macos-latest]
66
- node-version : [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 23.x]
67
-
52
+ node-version : [10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
68
53
runs-on : ${{ matrix.os }}
69
-
70
54
concurrency :
71
55
group : test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
72
56
cancel-in-progress : true
73
-
74
57
steps :
75
58
- name : Setup Git
76
59
if : matrix.os == 'windows-latest'
77
60
run : git config --global core.autocrlf input
78
-
79
61
- uses : actions/checkout@v4
80
-
81
62
- uses : actions/github-script@v7
82
63
id : calculate_architecture
83
64
with :
@@ -88,27 +69,22 @@ jobs:
88
69
} else {
89
70
return ''
90
71
}
91
-
92
72
- name : Use Node.js ${{ matrix.node-version }}
93
73
uses : actions/setup-node@v4
94
74
with :
95
75
node-version : ${{ matrix.node-version }}
96
76
architecture : ${{ steps.calculate_architecture.outputs.result }}
97
77
cache : " npm"
98
-
99
78
- name : Install dependencies
100
79
run : |
101
- npm i del-cli@^3
80
+ npm i -D typescript@4 del-cli@^3
102
81
npm i --ignore-engines
103
- if : matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x'
104
-
82
+ if : matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x'
105
83
- name : Install dependencies
106
84
run : npm ci
107
- if : matrix.node-version == '18.x' || matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '23.x'
108
-
85
+ if : matrix.node-version == '20.x' || matrix.node-version == '22.x' || matrix.node-version == '24.x'
109
86
- name : Run tests with coverage
110
87
run : npm run test:coverage -- --ci
111
-
112
88
- name : Submit coverage data to codecov
113
89
uses : codecov/codecov-action@v5
114
90
with :
0 commit comments