-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (54 loc) · 1.42 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
name: CI
on:
push:
branches: [master]
paths:
- "**.ts"
- "tsconfig.json"
- "ava.config.js"
- "package.json"
- "pnpm-lock.yaml"
- ".github/workflows/ci.yml"
pull_request:
branches: [master]
paths:
- "**.ts"
- "tsconfig.json"
- "ava.config.js"
- "package.json"
- "pnpm-lock.yaml"
- ".github/workflows/ci.yml"
jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest]
node: [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/[email protected]
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: true