forked from coinbase/cbpay-js
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 950 Bytes
/
unit-tests.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
name: Unit Tests
on: [pull_request, push]
jobs:
matrix:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.requireds }}
steps:
- uses: ljharb/actions/node/matrix@main
id: set-matrix
with:
versionsAsRoot: true
type: majors
preset: '^14 || >= 16'
test:
needs: [matrix]
name: 'On Node ${{ matrix.node-version }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
uses: bahmutov/npm-install@v1
- name: Unit Tests
run: yarn jest
tests:
needs: [test]
name: 'unit tests'
runs-on: ubuntu-latest
steps:
- run: echo 'tests completed'