Skip to content

Commit a0d5c27

Browse files
committed
[Tests] use a matrix on the nvm install-latest-npm tests
1 parent a781acb commit a0d5c27

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

.github/workflows/latest-npm.yml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,20 @@ name: 'Tests: `nvm install-latest-npm`'
33
on: [pull_request, push]
44

55
jobs:
6+
matrix:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
latest: ${{ steps.set-matrix.outputs.requireds }}
10+
steps:
11+
- uses: ljharb/actions/node/matrix@main
12+
id: set-matrix
13+
with:
14+
versionsAsRoot: true
15+
type: majors
16+
preset: '>=1'
17+
618
nodes:
19+
needs: [matrix]
720
permissions:
821
contents: read
922
name: 'nvm install-latest-npm'
@@ -12,33 +25,18 @@ jobs:
1225
strategy:
1326
fail-fast: false
1427
matrix:
15-
node-version:
16-
- "16"
17-
- "15"
18-
- "14"
19-
- "13"
20-
- "12"
21-
- "11"
22-
- "10"
23-
- "9"
24-
- "9.2"
25-
- "9.1"
26-
- "9.0"
27-
- "8"
28-
- "7"
29-
- "6"
30-
- "6.1"
31-
- "5"
32-
- "5.9"
33-
- "4"
34-
- "4.6"
35-
- "4.5"
36-
- "4.4"
37-
- "3"
38-
- "2"
39-
- "1"
40-
- "0.12"
41-
- "0.10"
28+
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
29+
include:
30+
- node-version: "9.2"
31+
- node-version: "9.1"
32+
- node-version: "9.0"
33+
- node-version: "6.1"
34+
- node-version: "5.9"
35+
- node-version: "4.6"
36+
- node-version: "4.5"
37+
- node-version: "4.4"
38+
- node-version: "0.12"
39+
- node-version: "0.10"
4240

4341
steps:
4442
- uses: actions/checkout@v2

0 commit comments

Comments
 (0)