Debian Codegraph @

available-typed-arrays/.github/workflows/node-4+.yml

raw
1 name: 'Tests: node.js'
2
3 on: [pull_request, push]
4
5 jobs:
6 matrix:
7 runs-on: ubuntu-latest
8 outputs:
9 latest: ${{ steps.set-matrix.outputs.requireds }}
10 minors: ${{ steps.set-matrix.outputs.optionals }}
11 steps:
12 - uses: ljharb/actions/node/matrix@main
13 id: set-matrix
14 with:
15 preset: '>=4'
16
17 latest:
18 needs: [matrix]
19 name: 'latest minors'
20 runs-on: ubuntu-latest
21
22 strategy:
23 fail-fast: false
24 matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
25
26 steps:
27 - uses: actions/checkout@v2
28 - uses: ljharb/actions/node/install@main
29 name: 'nvm install ${{ matrix.node-version }} && npm install'
30 with:
31 node-version: ${{ matrix.node-version }}
32 - run: npm run tests-only
33 - uses: codecov/codecov-action@v1
34
35 minors:
36 needs: [matrix, latest]
37 name: 'non-latest minors'
38 continue-on-error: true
39 if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
40 runs-on: ubuntu-latest
41
42 strategy:
43 fail-fast: false
44 matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
45
46 steps:
47 - uses: actions/checkout@v2
48 - uses: ljharb/actions/node/install@main
49 name: 'nvm install ${{ matrix.node-version }} && npm install'
50 with:
51 node-version: ${{ matrix.node-version }}
52 - run: npm run tests-only
53 - uses: codecov/codecov-action@v1
54
55 node:
56 name: 'node 4+'
57 needs: [latest, minors]
58 runs-on: ubuntu-latest
59 steps:
60 - run: 'echo tests completed'