Python: Add coverage threshold gate for PR checks (#3392)#3510
Merged
TaoChenOSU merged 6 commits intomicrosoft:mainfrom Jan 30, 2026
Merged
Python: Add coverage threshold gate for PR checks (#3392)#3510TaoChenOSU merged 6 commits intomicrosoft:mainfrom
TaoChenOSU merged 6 commits intomicrosoft:mainfrom
Conversation
- Add python-check-coverage.py script to enforce coverage threshold on specific modules - Modify python-test-coverage.yml to run coverage check after tests - Initial enforced module: agent_framework_azure_ai at 85% threshold - Other modules are reported for visibility but don't block merges
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a Python coverage threshold gate for PR checks to enforce minimum test coverage on specific modules. The implementation includes a new Python script that parses Cobertura XML coverage reports and a workflow modification to run the coverage check.
Changes:
- Added python-check-coverage.py script to enforce coverage threshold on specific modules
- Modified python-test-coverage.yml workflow to run coverage check after tests
- Set initial enforced module to agent_framework_azure_ai at 85% threshold
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| .github/workflows/python-test-coverage.yml | Added COVERAGE_THRESHOLD environment variable and a new step to run the coverage check script |
| .github/workflows/python-check-coverage.py | New script that parses coverage XML reports, enforces thresholds on configured modules, and reports results |
Member
eavanvalkenburg
approved these changes
Jan 29, 2026
giles17
approved these changes
Jan 29, 2026
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.
Motivation and Context
Closes #3392
Description
Contribution Checklist