-
-
Notifications
You must be signed in to change notification settings - Fork 81
56 lines (48 loc) · 1.56 KB
/
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
50
51
52
53
54
55
56
name: CI
on:
pull_request:
paths:
- '**.ts'
- 'package-lock.json'
- '.github/workflows/test.yml'
jobs:
test:
name: Test
env:
CI: true
HUSKY_SKIP_INSTALL: true
FORCE_COLOR: 2
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
node: [13.x, 12.x, 10.x]
exclude:
# On Windows, run tests with only the latest environments.
- os: windows-latest
node: 10.x
- os: windows-latest
node: 13.x
# On macOS, run tests with only the latest environments.
- os: macOS-latest
node: 10.x
- os: macOS-latest
node: 13.x
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: node --expose-gc node_modules/jest/bin/jest --forceExit --colors --logHeapUsage --runInBand --ci --reporters=default --reporters=jest-junit
env:
APPLE_PASS_PRIVATE_KEY: ${{secrets.APPLE_PASS_PRIVATE_KEY}}
APPLE_PASS_CERTIFICATE: ${{secrets.APPLE_PASS_CERTIFICATE}}
APPLE_PASS_KEY_PASSWORD: ${{secrets.APPLE_PASS_KEY_PASSWORD}}
- name: Upload coverage to Codecov
# https://github.com/codecov/codecov-bash/blob/1044b7a243e0ea0c05ed43c2acd8b7bb7cef340c/codecov#L158
run: npx codecov -f "./coverage/coverage-final.json"
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}