Skip to content

Commit 6369291

Browse files
authored
feat: setup codecov (#14)
1 parent d646f5a commit 6369291

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Run tests and upload coverage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
name: Run tests and collect coverage
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: pnpm/action-setup@v4
16+
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
cache: pnpm
21+
22+
- run: pnpm install --frozen-lockfile
23+
24+
- run: pnpm test:coverage
25+
26+
- name: Upload results to Codecov
27+
uses: codecov/codecov-action@v5
28+
with:
29+
token: ${{ secrets.CODECOV_TOKEN }}

packages/safe/vitest.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ export default defineConfig({
66
environment: 'node',
77
coverage: {
88
provider: 'v8',
9+
reporter: ['text', 'lcov'],
10+
reportsDirectory: './coverage',
911
thresholds: {
1012
lines: 90,
1113
functions: 90,

0 commit comments

Comments
 (0)