Skip to content

Commit 45aa8d9

Browse files
committed
chore(ci): add coverage reporting in ci
1 parent 5f1a28b commit 45aa8d9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,11 @@ jobs:
7777
test:
7878
name: Test
7979
runs-on: ubuntu-latest
80+
permissions:
81+
# Required to checkout the code
82+
contents: read
83+
# Required to put a comment into the pull-request
84+
pull-requests: write
8085
steps:
8186
- uses: actions/checkout@v4
8287
- name: Install pnpm
@@ -94,3 +99,6 @@ jobs:
9499

95100
- name: Test
96101
run: pnpm test:coverage
102+
103+
- name: 'Report coverage'
104+
uses: davelosert/vitest-coverage-report-action@v2

vitest.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default defineConfig({
1717
},
1818
coverage: {
1919
provider: 'v8', // or 'istanbul'
20+
reporter: ['text', 'json-summary', 'html'],
2021
include: ['app/**/*.{ts,js}'],
2122
exclude: ['app/**/*.test.ts', 'app/**/*.d.ts'],
2223
},

0 commit comments

Comments
 (0)