-
-
Notifications
You must be signed in to change notification settings - Fork 163
Fix: Collect and report code coverage #197
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
Conversation
The checkout with Perhaps it makes sense to switch to using the mirror at https://github.com/php/doc-en instead? |
Needs some work on the tests - will fix after dinner! |
run: "php vendor/bin/php-coveralls -v" | ||
working-directory: "generator" | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The secret COVERALLS_REPO_TOKEN
needs to be provided.
However, secrets will not be available when actions are triggered by actors who do not have write privileges. That's why I added continue-on-error
here.
For reference, see:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means that anyone other than moufmouf or me will not benefit from the code coverage report.
That makes it kinda useless. Could we not use the option --dry-run to do the report locally and make it create an error if the code coverage goes down?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe see coverallsapp/github-action#15
Hey @localheinz , Thanks a lot for this PR. I think we will put the COVERALLS_REPO_TOKEN environment variable in clear directly in the repo (so that we get code coverage from the forks too). It's never good to put a secret publicly, but that's "only" a secret for Coveralls. |
Thank you, @Kharhamel and @moufmouf! |
This PR
generator/composer.json
phpunit/phpunit:^8.5.2
pcov
extension enabledFollows #191 (comment).
💁♂ The update to PHP 7.2 allows us to install
phpunit/phpunit:^8
, which has support for collecting code coverage withpcov
, which in turn is a lot faster than usingXdebug
.