Skip to content

Commit 383b5cd

Browse files
jonkoopsrolandjitsu
authored andcommitted
chore: clean up test workflow
Signed-off-by: Jon Koops <[email protected]>
1 parent 7e3cef5 commit 383b5cd

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

.github/workflows/test.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,48 @@ on:
55
- master
66
- "[0-9]+.[0-9]+.x"
77
pull_request:
8-
types: [opened, synchronize]
8+
types: [opened, synchronize, reopened]
99

1010
jobs:
1111
test:
12+
name: Run tests on Node.js ${{ matrix.node-version }}
1213
runs-on: ubuntu-latest
1314
strategy:
1415
fail-fast: false
1516
matrix:
16-
node_version: [14, 16, 18, 20, 22]
17+
node-version: [14, 16, 18, 20, 22]
1718

1819
steps:
19-
- uses: actions/checkout@v2
20-
- name: Use Node.js ${{ matrix.node_version }}
21-
uses: actions/setup-node@v1
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
2225
with:
23-
node-version: ${{ matrix.node_version }}
26+
node-version: ${{ matrix.node-version }}
2427

2528
- name: Install compatible NPM version
26-
if: matrix.node_version == 14
29+
if: matrix.node-version == 14
2730
run: npm install -g npm@^9
2831

29-
- name: Install
32+
- name: Install dependencies
3033
run: npm ci
31-
- name: Test
34+
35+
- name: Run tests
3236
run: npm run test:cov
33-
- uses: coverallsapp/[email protected]
37+
38+
- name: Collect coverage
39+
uses: coverallsapp/github-action@v2
3440
with:
35-
github-token: ${{ secrets.GITHUB_TOKEN }}
41+
flag-name: run-${{ join(matrix.*, '-') }}
3642
parallel: true
3743

3844
coverage:
45+
name: Publish coverage
3946
needs: test
4047
runs-on: ubuntu-latest
4148
steps:
42-
- uses: coverallsapp/[email protected]
49+
- name: Publish coverage
50+
uses: coverallsapp/github-action@v2
4351
with:
44-
github-token: ${{ secrets.GITHUB_TOKEN }}
4552
parallel-finished: true

0 commit comments

Comments
 (0)