mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-29 00:01:42 +08:00
feat(ci): add Codecov coverage reporting and badge
Add json/json-summary reporters to vitest config, upload coverage to Codecov after test step in CI, and add coverage badge to README. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,11 @@ jobs:
|
||||
- run: npm run lint
|
||||
- run: npm run typecheck
|
||||
- run: npm test
|
||||
- uses: codecov/codecov-action@v5
|
||||
if: always()
|
||||
with:
|
||||
files: coverage/coverage.json
|
||||
fail_ci_if_error: false
|
||||
- run: mkdir -p dist
|
||||
- run: npm run test:cf
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
**The open-source, S3-native file hosting platform.**
|
||||
|
||||
[](https://github.com/saltbo/zpan/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/saltbo/zpan)
|
||||
[](https://github.com/saltbo/zpan/actions/workflows/release.yml)
|
||||
[](https://github.com/saltbo/zpan/releases/latest)
|
||||
[](https://ghcr.io/saltbo/zpan)
|
||||
|
||||
@@ -19,6 +19,11 @@ export default defineConfig({
|
||||
'src/**/*.test.ts',
|
||||
'src/i18n/index.ts',
|
||||
],
|
||||
reporter: ['text', 'json-summary', 'json'],
|
||||
reporterOptions: {
|
||||
'json-summary': { file: 'coverage-summary.json' },
|
||||
json: { file: 'coverage.json' },
|
||||
},
|
||||
thresholds: {
|
||||
statements: 90,
|
||||
branches: 80,
|
||||
|
||||
Reference in New Issue
Block a user