Conversation
Co-authored-by: a-25 <6087455+a-25@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add test coverage
Add V8 test coverage reporting to CI workflows
Aug 25, 2025
a-25
approved these changes
Aug 25, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive test coverage reporting using V8 coverage to all GitHub Actions workflows. The implementation provides immediate visibility into code coverage metrics through CI job logs without creating repository artifacts.
Key changes include:
- Addition of V8 coverage dependency and npm script for coverage analysis
- Enhanced Vitest configuration with improved coverage exclusions
- Integration of coverage reporting into all three CI workflows (main CI, PR checks, and release validation)
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Enhanced coverage configuration with V8 provider and exclusion patterns for test files and build artifacts |
| package.json | Added @vitest/coverage-v8 dependency and test:coverage npm script |
| .github/workflows/release.yml | Updated release workflow to run tests with coverage validation |
| .github/workflows/pr-check.yml | Modified PR check workflow to include coverage reporting in status checks |
| .github/workflows/ci.yml | Enhanced CI workflow with coverage analysis and reporting |
| "src/__tests__/**", | ||
| "**/*.test.ts", | ||
| "**/node_modules/**", | ||
| "dist/**" |
There was a problem hiding this comment.
The exclude pattern "**/*.test.ts" is redundant since "src/__tests__/**" already covers the test directory structure mentioned in the coding guidelines. According to the project structure, test files are located in src/__tests__/**/*.test.ts, so the first exclusion pattern already handles all test files.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive test coverage reporting using V8 coverage to all existing GitHub Actions workflows. The coverage reports are displayed directly in the CI job logs without creating artifacts, providing immediate visibility into code coverage metrics.
Changes Made
Dependencies and Scripts
@vitest/coverage-v8as a dev dependencynpm run test:coveragescript that runs tests with coverage analysisEnhanced Coverage Configuration
vitest.config.tswith improved coverage exclusions for test files, node_modules, and build artifactsCI Workflow Updates
All three workflows now include coverage reporting:
ci.yml): Shows coverage during main branch and PR buildspr-check.yml): Includes coverage validation in PR status checksrelease.yml): Validates coverage before creating release artifactsCoverage Results
The implementation shows approximately 40% overall coverage with detailed breakdown:
src/core/): ~61% coveragespawnAndCollectOutput.ts)Benefits
npm testcontinues to work without coverage overheadThe coverage reporting helps identify areas that need additional testing while maintaining the project's existing workflow patterns.
Fixes #17.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.