-
Notifications
You must be signed in to change notification settings - Fork 98
42 lines (36 loc) · 1016 Bytes
/
node.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
name: 'Tests: node.js'
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
minors: ${{ steps.set-matrix.outputs.optionals }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
preset: '>=6'
type: 'majors'
majors:
needs: [matrix]
name: 'latest majors'
runs-on: ubuntu-latest
strategy:
matrix: ${{ fromJson(needs.matrix.outputs.latest) }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- 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
- run: bash <(curl -s https://codecov.io/bash) -f coverage/*.json;
node:
name: 'node 6+'
needs: [majors]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'