-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (56 loc) · 1.52 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on:
push:
branches: [master]
paths:
- "**.ts"
- "tsconfig.json"
- "tsconfig.cjs.json"
- "tsconfig.esm.json"
- "ava.config.cjs"
- "package.json"
- ".github/workflows/ci.yml"
pull_request:
branches: [master]
paths:
- "**.ts"
- "tsconfig.json"
- "tsconfig.cjs.json"
- "tsconfig.esm.json"
- "ava.config.cjs"
- "package.json"
- ".github/workflows/ci.yml"
jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node: [12.x, 14.x, 16.x, 18.x]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: pnpm cache
uses: actions/cache@v2
env:
cache-name: cache-pnpm-store
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-${{ hashFiles('**/.package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node }}-
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: pnpm setup
uses: pnpm/action-setup@v2.0.1
with:
version: 6.2.1
run_install: true
- run: pnpm run ci
- name: Codecov
uses: codecov/codecov-action@v1
if: matrix.node == '16.x' && matrix.os == 'ubuntu-latest'
with:
file: ./coverage/coverage-final.json
flags: unittests
fail_ci_if_error: false