ci: enhanced CI/CD and test coverage

- Update version from 0.2.0 to 0.9.0
- Upgrade Vitest from v3 to v4 for improved testing capabilities
- Add @vitest/coverage-v8 for comprehensive code coverage reporting
- Enhance GitHub Actions CI workflow with separate unit and integration
test runs
- Integrate Codecov v5 for coverage reporting and test results tracking
- Add JUnit reporter for better test result analysis
- Configure @codecov/vite-plugin for automated coverage collection
This commit is contained in:
2025-10-23 00:59:18 -05:00
parent c7852ddab4
commit 852277d648
5 changed files with 498 additions and 168 deletions

View File

@@ -1,11 +1,32 @@
import { defineConfig } from "vitest/config";
import { codecovVitePlugin } from "@codecov/vite-plugin";
import path from "path";
export default defineConfig({
plugins: [
codecovVitePlugin({
enableBundleAnalysis: process.env.CODECOV_TOKEN !== undefined,
bundleName: "rdap",
uploadToken: process.env.CODECOV_TOKEN,
}),
],
test: {
globals: true,
environment: "happy-dom",
setupFiles: ["./src/test/setup.ts"],
coverage: {
provider: "v8",
reporter: ["text", "json", "html", "lcov"],
exclude: [
"**/*.config.*",
"**/dist/**",
"**/node_modules/**",
"**/.next/**",
"**/test/**",
"**/*.test.{ts,tsx}",
"**/src/env/**",
],
},
},
resolve: {
alias: {