Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try coverage #49

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@ jobs:
run: pnpm check
- name: 'Test'
run: pnpm vitest --watch=false
- name: 'Coverage'
run: pnpm vitest --coverage.enabled true
- name: "Upload Coverage"
uses: actions/upload-artifact@v4
with:
name: coverage
path: ./backend/coverage
23 changes: 23 additions & 0 deletions .github/workflows/report-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Report Coverage

on:
workflow_run:
workflows: ["Backend"]
types:
- completed

jobs:
report:
runs-on: ubuntu-latest

permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: "Report Coverage"
uses: davelosert/vitest-coverage-report-action@v2
3 changes: 2 additions & 1 deletion backend/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"enabled": true,
"rules": {
"recommended": true
}
},
"ignore": ["./coverage"]
},
"formatter": {
"enabled": true,
Expand Down
4 changes: 3 additions & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
"drizzle:generate": "drizzle-kit generate:pg",
"check": "biome check .",
"fix": "biome check --apply .",
"test": "vitest"
"test": "vitest",
"coverage": "vitest run --coverage"
},
"devDependencies": {
"@biomejs/biome": "1.6.4",
"@testcontainers/postgresql": "^10.8.1",
"@vitest/coverage-istanbul": "^1.4.0",
"drizzle-kit": "^0.20.14",
"testcontainers": "^10.8.1",
"tsx": "^4.7.2",
Expand Down
Loading
Loading