Upload coverage report artifacts#5950
Draft
staabm wants to merge 7 commits into
Draft
Conversation
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.
goal: make code-coverage data re-usable for use in coverage-guard
idea is to have the coverage data available in every pull request.
this data can for example be used
... without the need for creating the report locally, which is slow and requires additional tooling setup
artifacts can be downloaded with one of
gh run download <run-id> --repo=phpstan/phpstan-srcorgh run download <run-id> -n <name> --repo=phpstan/phpstan-srccaveat
since we are using PHPUnit 12 the coverage data beeing generated contains GitHub Action Runner local file paths. this means to use the data locally you need to replace paths within coverage data to match your local filesystem.
Starting with PHPUnit 13 paths in coverage data will no longer be recording environment specific and should be easier to reuse without additional processing, see https://phpunit.expert/articles/merging-code-coverage-data.html
I tried updating phpstan-src CI to PHPUnit 13, but this is blocked on ondrejmirtes/php-merge being compatible with
sebastian/diff: ^8, and this is blocked on updating theGitWrapperused inphp-merge, as the currently used one is abondend.related PHPStorm issues