-
Notifications
You must be signed in to change notification settings - Fork 133
43 lines (36 loc) · 1022 Bytes
/
test.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
43
name: Test
# https://git.luolix.topmunity/t/how-to-trigger-an-action-on-push-or-pull-request-but-not-both/16662
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
name: Execute full unit test suite
strategy:
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x]
os: [macOS-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out Git repository
uses: actions/checkout@v2
- name: node_modules cache
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
yarn install --frozen-lockfile --network-timeout 300000
- name: Build and run tests
run: |
make test