Feat: coverage in sharding#1758
Open
MrPunyapal wants to merge 16 commits into
Open
Conversation
…g and threshold evaluation
This reverts commit 9abe892.
MrPunyapal
force-pushed
the
feat/coverage-in-sharding
branch
from
July 19, 2026 10:32
007cebb to
a99c26d
Compare
MrPunyapal
marked this pull request as ready for review
July 19, 2026 11:02
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.
What:
Description
This PR adds first-class code coverage support for sharded Pest runs.
Previously, running
--coveragetogether with--shard=X/Ycollected coverage independently for each shard, but Pest did not provide a built-in way to combine those results into a single coverage report.With this PR, each shard stores its coverage data during execution, and a final merge step generates the same consolidated coverage report users expect from a non-sharded run.
What's Changed
pest --shard=X/Y --coveragenow stores shard coverage data in.pest/coverage/instead of generating a coverage report for each shard.pest --shards-coverageto merge all shard coverage into a single report.--min--exactly--only-covered--cleanto remove temporary shard coverage files after a successful merge.--coverage-htmland--coverage-clover) are ignored, and Pest prints a reminder showing how to generate the final merged report.How To Use Locally
Run each shard with coverage enabled:
Generate the merged coverage report:
Additional examples:
Notes
.pest/coverage/{shard}.cov.--cleanremoves the temporary coverage files after the merged report has been generated.--coverage-html,--coverage-clover, etc.) are ignored during sharded runs because reports can only be generated after all shard coverage has been merged.Example CI Workflow
Run each shard in parallel and upload the generated coverage directory as an artifact:
Merge coverage in a follow-up job:
20260424-1834-59.9415647.mp4