-
Notifications
You must be signed in to change notification settings - Fork 51
42 lines (41 loc) · 1.25 KB
/
run-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
42
name: run-tests
on:
workflow_call:
inputs:
node-matrix:
description: "An array of node versions against which the tests should be run"
required: false
type: string
default: "[{version: 'lts/*', artifact: 'lts'}]"
target-branch:
description: "What branch should be checked out?"
required: false
type: string
# If no target branch is specified, just use the one we'd use normally.
default: ${{ github.sha }}
jobs:
unit-tests:
strategy:
# By default, if any job in a matrix fails, all other jobs are immediately canceled. This makes the jobs run
# to completion instead.
fail-fast: false
matrix:
node: ${{ fromJson(inputs.node-matrix) }}
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
# Check out the code
- uses: actions/checkout@v4
with:
ref: ${{ inputs.target-branch }}
# Make sure we're on the right version on Node
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
<<<<<<< Updated upstream
=======
- run: yarn
>>>>>>> Stashed changes
- run: yarn build
- run: yarn test
- run: yarn lint