File tree Expand file tree Collapse file tree 3 files changed +31
-6
lines changed
Expand file tree Collapse file tree 3 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,24 @@ permissions:
1212jobs :
1313 report :
1414 runs-on : ubuntu-latest
15+
16+ strategy :
17+ matrix :
18+
19+ #
20+ # The test report is published for every supported nodejs version. But the
21+ # coverage information is reported for the latest nodejs version only. When
22+ # changing this array here make sure to update the latest version below
23+ # (next comment).
24+ #
25+
26+ node-version : [20.x, 22.x]
27+
1528 steps :
1629 - name : Download workflow artifact
1730 uses : actions/download-artifact@v4
1831 with :
19- name : test-results
32+ name : test-results-${{ matrix.node-version }}
2033 run-id : ${{ github.event.workflow_run.id }}
2134 github-token : ${{ secrets.GITHUB_TOKEN }}
2235 - name : Set pr number env
@@ -27,11 +40,18 @@ jobs:
2740 uses : phoenix-actions/test-reporting@v15
2841 id : test-report
2942 with :
30- artifact : test-results
31- name : Mocha Tests
43+ artifact : test-results-${{ matrix.node-version }}
44+ name : Mocha Tests (node v${{ matrix.node-version }})
3245 path : test-results.json
3346 reporter : mocha-json
3447 - name : c8 coverage report
48+
49+ #
50+ # The coverage report is generated for the latest node version only.
51+ # Make sure, to update this when changing the matrix above.
52+ #
53+
54+ if : ${{ matrix.node-version == '22.x' }}
3555 uses : Nef10/lcov-reporter-action@v0.4.0
3656 with :
3757 pr-number : ${{ env.PR_NUMBER }}
Original file line number Diff line number Diff line change @@ -9,14 +9,19 @@ permissions:
99jobs :
1010 test :
1111 runs-on : ubuntu-latest
12+
13+ strategy :
14+ matrix :
15+ node-version : [20.x, 22.x]
16+
1217 steps :
1318 - run : sudo apt-get install hunspell
1419 - uses : actions/checkout@v4
1520 with :
1621 submodules : recursive
1722 - uses : actions/setup-node@v4
1823 with :
19- node-version : 20
24+ node-version : ${{ matrix.node-version }}
2025 - run : npm ci
2126 - run : npm run test-report
2227 - run : npm run test-coverage-lcov
2833 - uses : actions/upload-artifact@v4
2934 if : success() || failure()
3035 with :
31- name : test-results
36+ name : test-results-${{ matrix.node-version }}
3237 path : |
3338 test-results.json
3439 coverage
Original file line number Diff line number Diff line change @@ -547,7 +547,7 @@ export const weaknesses: Array<{ id: string; name: string }>
547547
548548## Testing
549549
550- Tests are implemented using [mocha](https://mochajs.org/). The minimal supported Node.js version is **14 **. They can be run using the following command:
550+ Tests are implemented using [mocha](https://mochajs.org/). The minimal supported Node.js version is **20 **. They can be run using the following command:
551551
552552` ` ` sh
553553npm test
You can’t perform that action at this time.
0 commit comments