Skip to content

Commit b6b6289

Browse files
authored
chore: Adding codecov (#341)
1 parent 6bf9197 commit b6b6289

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test and Coverage
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Use Node.js 20
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
cache: 'yarn'
21+
22+
- name: Install dependencies
23+
run: yarn install --frozen-lockfile
24+
25+
- name: Run tests with coverage
26+
run: yarn test --coverage
27+
28+
- name: Upload coverage to Codecov
29+
uses: codecov/codecov-action@v4
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}
32+
file: ./coverage/lcov.info
33+
flags: unittests
34+
name: codecov-umbrella
35+
fail_ci_if_error: true

codecov.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
target: 80%
6+
threshold: 5%
7+
patch:
8+
default:
9+
target: 80%
10+
threshold: 5%
11+
12+
comment:
13+
layout: "reach, diff, flags, files"
14+
behavior: default
15+
require_changes: false
16+
require_base: no
17+
require_head: yes
18+
19+
ignore:
20+
- "test/**/*"
21+
- "**/*.d.ts"

0 commit comments

Comments
 (0)