9
9
schedule :
10
10
- cron : ' 0 2 * * 1' # At 02:00 on Monday
11
11
12
- env :
13
- NODE_OPTIONS : --max-old-space-size=4096
12
+ permissions : {}
14
13
15
14
jobs :
16
15
test :
17
16
name : Test
18
- timeout-minutes : 15
17
+ timeout-minutes : 5
19
18
strategy :
20
19
matrix :
21
20
os : [ubuntu-latest]
22
- node-version : [16, 18]
21
+ node-version :
22
+ - 16
23
+ - 18
24
+ - 20
25
+ - 21
23
26
include :
24
27
- os : macos-latest
25
- node-version : 16 # LTS
28
+ node-version : 20 # LTS
29
+ - os : windows-latest
30
+ node-version : 20 # LTS
26
31
fail-fast : false
27
32
runs-on : ${{ matrix.os }}
28
33
steps :
29
- - uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
34
+ - uses : step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
35
+ if : ${{ matrix.os == 'ubuntu-latest' }}
30
36
with :
31
- fetch-depth : 0
37
+ egress-policy : audit
38
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
32
39
- name : Use Node.js ${{ matrix.node-version }}
33
- uses : actions/setup-node@v3
40
+ uses : actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
34
41
with :
35
42
node-version : ${{ matrix.node-version }}
43
+ cache : npm
36
44
- name : Bootstrap project
37
- run : |
38
- npm ci --ignore-scripts
39
- -
uses :
Yuri6037/[email protected]
45
+ run : >
46
+ npm ci
47
+ --ignore-scripts
48
+ --prefer-offline
49
+ - uses : Yuri6037/Action-FakeTTY@1abc69c7d530815855caedcd73842bae5687c1a6 # v1.1
40
50
- name : Run tests
41
51
run : faketty npm test --ignore-scripts
42
52
43
53
code-lint :
44
54
name : Code Lint
45
55
runs-on : ubuntu-latest
46
56
steps :
47
- - uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
48
- - name : Use Node.js 16
49
- uses : actions/setup-node@v3
57
+ - uses : step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
58
+ if : ${{ matrix.os == 'ubuntu-latest' }}
59
+ with :
60
+ egress-policy : audit
61
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
62
+ - name : Use Node.js 20
63
+ uses : actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
50
64
with :
51
- node-version : 16
65
+ node-version : 20
66
+ cache : ' npm'
52
67
- name : Bootstrap project
53
- run : |
54
- npm ci --ignore-scripts
68
+ run : >
69
+ npm ci
70
+ --ignore-scripts
71
+ --prefer-offline
55
72
- name : Verify code linting
56
73
run : npm run lint
57
74
@@ -60,15 +77,31 @@ jobs:
60
77
runs-on : ubuntu-latest
61
78
if : ${{ github.event.pull_request }}
62
79
steps :
63
- - uses : actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
80
+ - uses : step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
81
+ if : ${{ matrix.os == 'ubuntu-latest' }}
82
+ with :
83
+ egress-policy : audit
84
+ - uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
64
85
with :
65
86
fetch-depth : 0
66
- - name : Use Node.js 16
67
- uses : actions/setup-node@v3
87
+ - name : Use Node.js 20
88
+ uses : actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
68
89
with :
69
- node-version : 16
90
+ node-version : 20
91
+ cache : npm
70
92
- name : Bootstrap project
71
- run : |
72
- npm ci --ignore-scripts
93
+ run :
94
+ npm ci
95
+ --ignore-scripts
96
+ --prefer-offline
73
97
- name : Verify commit linting
74
- run : npx commitlint --from origin/master --to HEAD --verbose
98
+ run : >
99
+ npm exec
100
+ --no-install
101
+ --package=@commitlint/cli
102
+ --
103
+ commitlint
104
+ --from=origin/master
105
+ --to=HEAD
106
+ --verbose
107
+
0 commit comments