-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (39 loc) · 1018 Bytes
/
tests.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
name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types:
- opened
- synchronize
- reopened
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]
steps:
- uses: actions/checkout@v4
- name: Set Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: |
yarn install --frozen-lockfile
- name: Run Tests
run: |
yarn test:ci
- name: Collect Coverage
if: "!contains(github.event.pull_request.labels.*.name, 'dependencies')"
run: |
yarn coverage
- name: Upload Coverage Reports to Codecov
if: "!contains(github.event.pull_request.labels.*.name, 'dependencies')"
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}