Skip to content

Commit

Permalink
[Tests] run assert tests on a dynamic matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Nov 12, 2019
1 parent edfb752 commit 695aebd
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/node-assert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,27 @@ name: 'Tests: node.js `assert`'
on: [pull_request, push]

jobs:
matrix:
runs-on: ubuntu-latest
outputs:
requireds: ${{ steps.set-matrix.outputs.requireds }}
optionals: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
type: 'majors'
requireds: '^12.16 || >= 13.4'
optionals: '>= 8 < 12.16 || ^13.0 < 13.4'

assert-required:
needs: [matrix]
name: 'assert: required'
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- "15"
- "14"
- "13"
- "12"
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.requireds) }}

steps:
- uses: actions/checkout@v2
Expand All @@ -27,17 +37,14 @@ jobs:
- uses: codecov/codecov-action@v1

assert-optional:
needs: [matrix]
name: 'assert: optional'
runs-on: ubuntu-latest
continue-on-error: true

strategy:
matrix:
node-version:
- "11"
- "10"
- "9"
- "8"
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.optionals) }}

steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit 695aebd

Please sign in to comment.