1name: 'Tests: node.js (io.js)'
2
3on: [pull_request, push]
4
5jobs:
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: 'iojs'
16
17  latest:
18    needs: [matrix]
19    name: 'latest minors'
20    runs-on: ubuntu-latest
21
22    strategy:
23      matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
24
25    steps:
26      - uses: actions/checkout@v2
27      - uses: ljharb/actions/node/run@main
28        name: 'npm install && npm run tests-only'
29        with:
30          node-version: ${{ matrix.node-version }}
31          command: 'tests-only'
32          skip-ls-check: true
33
34  minors:
35    needs: [matrix, latest]
36    name: 'non-latest minors'
37    continue-on-error: true
38    if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
39    runs-on: ubuntu-latest
40
41    strategy:
42      matrix: ${{ fromJson(needs.matrix.outputs.minors) }}
43
44    steps:
45      - uses: actions/checkout@v2
46      - uses: ljharb/actions/node/run@main
47        name: 'npm install && npm run tests-only'
48        with:
49          node-version: ${{ matrix.node-version }}
50          command: 'tests-only'
51          skip-ls-check: true
52
53  node:
54    name: 'io.js'
55    needs: [latest, minors]
56    runs-on: ubuntu-latest
57    steps:
58      - run: 'echo tests completed'
59