This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
forked from honojs/hono
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Report coverage with CodeCov (honojs#2862)
* Output coverage per each test * Collect coverage * Exclude test-only files * update comment * exclude types * Add config * Update bun comment * Generate coverage in Deno
- Loading branch information
Showing
11 changed files
with
117 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Edit "test.coverage.exclude" option in vitest.config.ts to exclude specific files from coverage reports. | ||
# We can also use "ignore" option in codecov.yml, but it is not recognized by vitest, so results may differ on local. | ||
|
||
coverage: | ||
status: | ||
patch: | ||
default: | ||
target: 80% | ||
informational: true # Don't fail the build even if coverage is below target | ||
project: | ||
default: | ||
target: 75% | ||
threshold: 1% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
/// <reference types="vitest" /> | ||
import { defineConfig } from 'vitest/config' | ||
import config from '../../vitest.config' | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
include: ['**/runtime_tests/bun/**/*.+(ts|tsx|js)'], | ||
coverage: { | ||
...config.test?.coverage, | ||
reportsDirectory: './coverage/raw/runtime-bun', | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
/// <reference types="vitest" /> | ||
import fastlyCompute from 'vite-plugin-fastly-js-compute' | ||
import { defineConfig } from 'vitest/config' | ||
import config from '../../vitest.config' | ||
|
||
export default defineConfig({ | ||
plugins: [fastlyCompute()], | ||
test: { | ||
globals: true, | ||
include: ['**/runtime_tests/fastly/**/(*.)+(test).+(ts|tsx)'], | ||
exclude: ['**/runtime_tests/fastly/vitest.config.ts'], | ||
coverage: { | ||
...config.test?.coverage, | ||
reportsDirectory: './coverage/raw/runtime-fastly', | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
/// <reference types="vitest" /> | ||
import { defineConfig } from 'vitest/config' | ||
import config from '../../vitest.config' | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
include: ['**/runtime_tests/wrangler/**/(*.)+(test).+(ts|tsx)'], | ||
exclude: ['**/runtime_tests/wrangler/vitest.config.ts'], | ||
coverage: { | ||
...config.test?.coverage, | ||
reportsDirectory: './coverage/raw/runtime-wrangler', | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters