Skip to content

Coverage: Implement fail_under #654

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

Merged
merged 7 commits into from
Aug 22, 2025
Merged

Conversation

Daraan
Copy link
Contributor

@Daraan Daraan commented Aug 22, 2025

Set the fail threshold to 96% and implemented it by fail_under in pyproject.toml.

The fail will now be raised by coverage report and not the action. I set up the action to always run even if coverage report fails (still need to test first if it works as intended).

@Daraan Daraan marked this pull request as draft August 22, 2025 16:16
@Daraan Daraan force-pushed the coverage/fail-under branch from 5feaaa0 to 5232220 Compare August 22, 2025 16:43
@Daraan
Copy link
Contributor Author

Daraan commented Aug 22, 2025

Works like expected.

I just realized that coverage fail_under and the actions fail_below_min were not in sync. E.g a 96% coverage was ok for coverage but the action failed.
See run: https://github.com/Daraan/typing_extensions/actions/runs/17160726679/job/48689088817

Therefore I adjusted the threshold by -1 to 95%.
It would also be an option to not set fail_below_min but that then would not post the minimum allowed message.

@Daraan Daraan marked this pull request as ready for review August 22, 2025 16:47
@JelleZijlstra JelleZijlstra merged commit 67d37fe into python:main Aug 22, 2025
23 checks passed
@Daraan Daraan deleted the coverage/fail-under branch August 25, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants