43 lines (41 loc) · 1023 Bytes
/
ci.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: CI
on:
push:
branches:
- main
tags:
- '!*'
pull_request:
jobs:
test:
name: Node ${{ matrix.node }} and ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node: [12, 14]
runs-on: ${{ matrix.os }}
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
check-latest: true
- name: Print Node Version
run: node --version
- name: Install Dependencies
run: yarn install
- name: Build Test Binary
run: yarn build-test-binary
- name: Build
run: yarn build
- name: Run Tests
run: yarn test
- name: Coverage
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 # only run once
run: yarn test-coverage