Feat: coverage in shards#1686
Open
MrPunyapal wants to merge 17 commits into
Open
Conversation
3546319 to
0d7ce47
Compare
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 coverage support for sharded Pest runs and fixes the CI/composer setup required to run that flow reliably.
It solves two concrete problems:
--coverageand--shard=X/Ydid not provide a built-in way to collect coverage from each shard and merge it into one final report.pestphp/pest-plugin-browser.What changed:
pest --shard=X/Y --coveragenow stores coverage as.covfiles under.pest/coverage/instead of trying to render a report per shard.pest --shards-coveragenow merges all shard coverage files and prints one combined coverage report.--shards-coveragesupports the existing coverage thresholds via--minand--exactly, supports--only-covered, and can clean up temporary coverage files with--clean.COMPOSER_ROOT_VERSION=4.x-devand uses the supported Symfony floors (7.4.8and8.0.8) so dependency resolution stays stable across the matrix.How To Use Locally:
Run each shard with coverage enabled:
Merge the generated shard coverage files into one final report:
Useful local variants:
Notes:
.pest/coverage/{shard}.cov.--cleanremoves the temporary.covfiles after the merged report is generated.How To Use In CI:
.pest/coverage/as an artifact.20260424-1834-59.9415647.mp4