-
Notifications
You must be signed in to change notification settings - Fork 96
feat(ci): Add PR coverage check workflow #8667
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
Conversation
Add GitHub Action that enforces test coverage for changed files in PRs: - Checks coverage for utilities and React components - Excludes models, types, constants, and config files - Posts coverage report as PR comment - Fails build if changed files lack test coverage Also adds lcov reporter to all vitest configs for detailed coverage analysis. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
❌ Impact of Change
❌ Test Plan
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change needed |
| Commit Type | ✅ | No change needed |
| Risk Level | ✅ | No change needed |
| What & Why | ✅ | Optionally mention third-party actions/tools |
| Impact of Change | ❌ | Expand to call out CI runtime/branch protection effects |
| Test Plan | ❌ | Check the "E2E tests added/updated" box and add validation details |
| Contributors | Optionally add co-authors / contributors | |
| Screenshots/Videos | No change needed |
Final message
This PR largely follows the required PR template and is well-written. I am passing this PR (passes = true) because the only substantive template mismatch is the Test Plan checkbox for E2E tests — the diff shows E2E test updates, so please update the Test Plan to check "E2E tests added/updated" and add a one-line note describing how you verified the E2E fix (e.g., local Playwright run succeeded, or referenced CI run number).
Other small recommendations:
- Add a short note about third-party action/tool usage (tj-actions/changed-files, lcov-result-merger) so reviewers and maintainers are aware of runtime dependencies.
- Expand Impact to mention that the new workflow runs tests/coverage and may increase PR CI time; call out if any branch protection will be tied to this new check.
- Optionally populate the Contributors section to credit co-authors.
After the small updates above, this PR body will be fully aligned with the repository template. Thank you!
Last updated: Wed, 17 Dec 2025 16:52:05 GMT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a GitHub Actions workflow to enforce test coverage for changed files in pull requests. The workflow detects modified TypeScript files, runs unit tests with coverage, analyzes coverage for each changed file, and fails the build if any file lacks adequate coverage. It also updates all vitest configuration files across the monorepo to include the lcov reporter, enabling detailed line-by-line coverage analysis.
Key Changes:
- New
pr-coverage.ymlworkflow that runs on PRs to main/dev/hotfix branches and enforces 80% coverage threshold - Addition of
lcovreporter to 12 vitest configuration files across libs/ and apps/ directories - Automated PR comment posting with detailed coverage results for changed files
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/pr-coverage.yml |
New workflow implementing coverage checks for changed files with exclusions for tests, types, constants, and config files |
libs/vscode-extension/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/logic-apps-shared/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/designer/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/designer-v2/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/designer-ui/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/data-mapper/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/data-mapper-v2/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/chatbot/vitest.config.ts |
Added lcov reporter to coverage configuration |
libs/a2a-core/vitest.config.ts |
Added lcov reporter to coverage configuration |
apps/vs-code-react/vitest.config.ts |
Added lcov reporter to coverage configuration |
apps/vs-code-designer/vitest.config.ts |
Added lcov reporter to coverage configuration |
apps/iframe-app/vitest.config.ts |
Added lcov reporter to coverage configuration |
|
📊 Coverage check completed. See workflow run for details. |
Replace btoa() with Buffer.from().toString('base64') for proper UTF-8
support in Playwright tests running in Node.js environment. This fixes
JWT token encoding for usernames with special/Unicode characters.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
📊 Coverage check completed. See workflow run for details. |
❌ PR Validation ErrorAn error occurred while validating your PR. Please try again later or contact the maintainers. Error: Bad escaped character in JSON at position 3007 |
|
📊 Coverage check completed. See workflow run for details. |
Commit Type
Risk Level
What & Why
Adds a GitHub Action workflow that enforces test coverage for changed files in PRs. This ensures all developers
contributing to the repo have unit tests for any code changes they submit.
The workflow:
Also adds lcov reporter to all vitest configs for detailed line-by-line coverage analysis.
Files excluded from coverage check:
Also includes a fix for E2E chat client tests that were failing due to btoa() not supporting UTF-8 characters in
Node.js environment.
Impact of Change
Test Plan
Contributors
Screenshots/Videos