-
-
Notifications
You must be signed in to change notification settings - Fork 109
65 lines (56 loc) · 1.65 KB
/
node-assert.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.requireds) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run tests-only
env:
ASSERT: true
- uses: codecov/codecov-action@v2
assert-optional:
needs: [matrix]
name: 'assert: optional'
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix.outputs.optionals) }}
steps:
- uses: actions/checkout@v2
- uses: ljharb/actions/node/install@main
name: 'nvm install ${{ matrix.node-version }} && npm install'
with:
node-version: ${{ matrix.node-version }}
- run: npm run tests-only
env:
ASSERT: true
- uses: codecov/codecov-action@v2
assert:
name: 'node: assert'
needs: [assert-required, assert-optional]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'