Skip to content

Commit

Permalink
chore: setup coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 6, 2024
1 parent 2744f21 commit 23fc41f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ jobs:
- run: pnpm lint
- run: pnpm test:types
- run: pnpm build
- run: pnpm vitest
- run: pnpm vitest run --coverage
- uses: codecov/codecov-action@v4
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"play:sse": "bun test/fixture/sse.ts",
"play:uws": "jiti test/fixture/uws.ts",
"release": "pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags",
"test": "pnpm lint && pnpm test:types && vitest run",
"test": "pnpm lint && pnpm test:types && vitest run --coverage",
"test:types": "tsc --noEmit --skipLibCheck"
},
"resolutions": {
Expand Down
16 changes: 16 additions & 0 deletions vitest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
typecheck: { enabled: true },
coverage: {
include: ["src/**/*.ts"],
exclude: [
"src/websocket/*",
"src/adapters/*",
"!src/adapters/node.ts",
"!src/adapters/uws.ts",
],
},
},
});

0 comments on commit 23fc41f

Please sign in to comment.