49 lines (43 loc) · 1.13 KB
/
dev-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
44
45
46
47
48
49
name: Dev
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
node:
- "13"
- "12"
- "10"
include:
# only enable coverage on the fastest job
- os: "ubuntu-latest"
node: "12"
ENABLE_CODE_COVERAGE: true
env:
ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }}
name: Node.js ${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: yarn test --maxWorkers=4
- name: Upload Coverage
uses: codecov/codecov-action@v1
if: matrix.ENABLE_CODE_COVERAGE
with:
file: ./coverage/lcov.info
fail_ci_if_error: true