@@ -37,12 +37,18 @@ jobs:
3737 - Node.js 19.x
3838 - Node.js 20.x
3939 - Node.js 21.x
40+ - Node.js 22.x
41+ - Node.js 23.x
42+ - Node.js 24.x
43+ - Node.js 25.x
4044
4145 include :
42- - name : Node.js 0.6
43- node-version : " 0.6"
44- npm-i : mocha@1.21.5
45- npm-rm : nyc
46+ # Node.js 0.6 is currently disabled: it's a very old runtime and the toolchain/OS
47+ # setup required to run the pipeline needs to be reviewed and maintained separately.
48+ # - name: Node.js 0.6
49+ # node-version: "0.6"
50+ # npm-i: mocha@1.21.5
51+ # npm-rm: nyc
4652
4753 - name : Node.js 0.8
4854 node-version : " 0.8"
@@ -131,21 +137,38 @@ jobs:
131137 - name : Node.js 21.x
132138 node-version : " 21.7"
133139
140+ - name : Node.js 22.x
141+ node-version : " 22"
142+
143+ - name : Node.js 23.x
144+ node-version : " 23"
145+
146+ - name : Node.js 24.x
147+ node-version : " 24"
148+
149+ - name : Node.js 25.x
150+ node-version : " 25"
151+
134152 steps :
135153 - uses : actions/checkout@v3
136154
137155 - name : Install Node.js ${{ matrix.node-version }}
138156 shell : bash -eo pipefail -l {0}
139157 run : |
140- if [[ "${{ matrix.node-version }}" == 0.6* ]]; then
141- sudo sh -c 'echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list'
142- sudo sh -c 'echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list'
143- sudo apt-get update
144- sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev python2 python-is-python2
145- export CC=/usr/bin/gcc-4.8
146- export CXX=/usr/bin/g++-4.8
147- export CXXCOM='$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-narrowing -Wno-strict-overflow $_CCCOMCOM $SOURCES'
148- fi
158+ # NOTE: Node.js 0.6 is currently disabled. Keeping the setup here commented out as a
159+ # reference; running 0.6 requires an old toolchain/OS packages and should be revisited
160+ # before re-enabling it in the matrix.
161+ # if [[ "${{ matrix.node-version }}" == 0.6* ]]; then
162+ # sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
163+ # sudo sh -c 'echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list'
164+ # sudo sh -c 'echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list'
165+ # sudo apt-get update
166+ # sudo apt-get install -y g++-4.8 gcc-4.8 libssl1.0-dev python2.7
167+ # sudo ln -sf /usr/bin/python2.7 /usr/bin/python
168+ # export CC=/usr/bin/gcc-4.8
169+ # export CXX=/usr/bin/g++-4.8
170+ # export CXXCOM='$CXX -o $TARGET -c $CXXFLAGS $CCFLAGS -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-narrowing -Wno-strict-overflow $_CCCOMCOM $SOURCES'
171+ # fi
149172 nvm install --default ${{ matrix.node-version }}
150173 if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
151174 nvm install --alias=npm 0.10
@@ -213,47 +236,39 @@ jobs:
213236 if : steps.list_env.outputs.eslint != ''
214237 run : npm run lint
215238
216- - name : Collect code coverage
217- if : steps.list_env.outputs.nyc != ''
218- run : |
219- if [[ -d ./coverage ]]; then
220- mv ./coverage "./${{ matrix.name }}"
221- mkdir ./coverage
222- mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
223- fi
224-
225239 - name : Upload code coverage
226240 uses : actions/upload-artifact@v4
227- if : steps.list_env.outputs.nyc != ''
241+ if : steps.list_env.outputs.nyc != '' && hashFiles('coverage/lcov.info') != ''
228242 with :
229- name : coverage
230- path : ./coverage
243+ name : coverage-node-${{ matrix.node-version }}
244+ path : ./coverage/lcov.info
231245 retention-days : 1
232246
233247 coverage :
234- permissions :
235- checks : write # for coverallsapp/github-action to create new checks
236- contents : read # for actions/checkout to fetch code
237248 needs : test
238249 runs-on : ubuntu-latest
250+ permissions :
251+ contents : read # for actions/checkout to fetch code
252+ checks : write # for coverallsapp/github-action to create new checks
239253 steps :
240- - uses : actions/checkout@v3
254+ - uses : actions/checkout@v4
241255
242256 - name : Install lcov
243257 shell : bash
244258 run : sudo apt-get -y install lcov
245259
246260 - name : Collect coverage reports
247- uses : actions/download-artifact@v4
261+ uses : actions/download-artifact@v6
248262 with :
249- name : coverage
250263 path : ./coverage
264+ pattern : coverage-node-*
251265
252266 - name : Merge coverage reports
253267 shell : bash
254- run : find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage /lcov.info
268+ run : find ./coverage -type f - name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./lcov.info
255269
256270 - name : Upload coverage report
257271 uses : coverallsapp/github-action@master
258272 with :
259273 github-token : ${{ secrets.GITHUB_TOKEN }}
274+ path-to-lcov : ./lcov.info
0 commit comments