[Tests] use a matrix on the `nvm install-latest-npm` tests

Jordan Harband 2021-10-05 16:14:05 -07:00
parent ebbd30eb7f
commit da5baa005b
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 25 additions and 27 deletions

View File

@ -3,7 +3,20 @@ name: 'Tests: `nvm install-latest-npm`'
on: [pull_request, push] on: [pull_request, push]
jobs: jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
type: majors
preset: '>=1'
nodes: nodes:
needs: [matrix]
permissions: permissions:
contents: read contents: read
name: 'nvm install-latest-npm' name: 'nvm install-latest-npm'
@ -12,33 +25,18 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
node-version: node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
- "16" include:
- "15" - node-version: "9.2"
- "14" - node-version: "9.1"
- "13" - node-version: "9.0"
- "12" - node-version: "6.1"
- "11" - node-version: "5.9"
- "10" - node-version: "4.6"
- "9" - node-version: "4.5"
- "9.2" - node-version: "4.4"
- "9.1" - node-version: "0.12"
- "9.0" - node-version: "0.10"
- "8"
- "7"
- "6"
- "6.1"
- "5"
- "5.9"
- "4"
- "4.6"
- "4.5"
- "4.4"
- "3"
- "2"
- "1"
- "0.12"
- "0.10"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2