@@ -2,9 +2,10 @@ name: CI
22
33on :
44 push :
5- branches : [ v9 ]
5+ branches : [v9 ]
66 pull_request :
7- branches : [ v9 ]
7+ branches : [v9]
8+ workflow_call :
89
910jobs :
1011 test :
1516 fail-fast : false
1617 matrix :
1718 os :
18- - ubuntu-latest
19+ - ubuntu-24.04
1920 - macos-13
20- - windows-latest
21+ - windows-2022
2122 node-version :
2223 - 8
2324 - 9
@@ -34,38 +35,76 @@ jobs:
3435 - 20
3536 - 21
3637 - 22
38+ - 23
3739 steps :
38- - uses : actions/checkout@v2
39- - name : Use Node.js ${{ matrix.node-version }}
40- uses : actions/setup-node@v1
41- with :
42- node-version : ${{ matrix.node-version }}
43- - name : Install Dependencies
44- if : matrix.node-version != 9
45- run : npm ci --ignore-scripts
46- - name : Install Dependencies (Node.js v9)
47- if : matrix.node-version == 9
48- run : npm install
49- - name : Run Tests
50- if : matrix.os != 'windows-latest'
51- run : npm test
52- - name : Run Tests (Windows)
53- if : matrix.os == 'windows-latest'
54- run : npm run-script test-windows
55- - name : Publish Coverage
56- if : matrix.os == 'ubuntu-latest' && matrix.node-version == 16 # LTS
57- uses : coverallsapp/github-action@9ba913c152ae4be1327bfb9085dc806cedb44057
58- with :
59- github-token : ${{ secrets.GITHUB_TOKEN }}
40+ - name : Harden Runner
41+ uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
42+ with :
43+ disable-sudo : true
44+ egress-policy : block
45+ allowed-endpoints : >
46+ api.github.com:443
47+ coveralls.io:443
48+ github.com:443
49+ nodejs.org:443
50+ objects.githubusercontent.com:443
51+ registry.npmjs.org:443
52+ - name : Checkout Repository
53+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+ - name : Use Node.js ${{ matrix.node-version }}
55+ uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
56+ with :
57+ node-version : ${{ matrix.node-version }}
58+ - name : Install Dependencies
59+ if : matrix.node-version != 9
60+ run : npm ci --ignore-scripts
61+ - name : Install Dependencies (Node.js v9)
62+ if : matrix.node-version == 9
63+ run : npm install
64+ - name : Run Tests
65+ if : ${{ ! startsWith(matrix.os, 'windows-') }}
66+ run : npm test
67+ - name : Run Tests (Windows)
68+ if : startsWith(matrix.os, 'windows-')
69+ shell : cmd
70+ run : npm run test-windows
71+ - name : Publish Coverage
72+ if : github.event != 'workflow_dispatch'
73+ uses : coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 # v2.3.4
74+ with :
75+ flag-name : run-${{ matrix.os }}-node@${{ matrix.node-version }}
76+ github-token : ${{ secrets.GITHUB_TOKEN }}
77+ parallel : true
78+ post-test :
79+ name : Post-Test
80+ needs : test
81+ if : ${{ (github.event != 'workflow_dispatch') && success() }}
82+ runs-on : ubuntu-24.04
83+ steps :
84+ - name : Coveralls Finished
85+ uses : coverallsapp/github-action@cfd0633edbd2411b532b808ba7a8b5e04f76d2c8 # v2.3.4
86+ with :
87+ github-token : ${{ secrets.GITHUB_TOKEN }}
88+ parallel-finished : true
6089 code-lint :
6190 name : Code Lint
62- runs-on : ubuntu-latest
91+ runs-on : ubuntu-24.04
6392 steps :
64- - uses : actions/checkout@v2
93+ - name : Harden Runner
94+ uses : step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
95+ with :
96+ disable-sudo : true
97+ egress-policy : block
98+ allowed-endpoints : >
99+ api.github.com:443
100+ github.com:443
101+ objects.githubusercontent.com:443
102+ registry.npmjs.org:443
103+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65104 - name : Use Node.js 16
66- uses : actions/setup-node@v1
105+ uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
67106 with :
68- node-version : 16 # LTS
107+ node-version : 22 # LTS
69108 - name : Install Dependencies
70109 run : npm ci --ignore-scripts
71110 - name : Lockfile Lint
0 commit comments