-
Notifications
You must be signed in to change notification settings - Fork 6
GH Actions: Added support for code coverage with Coveralls.io #40
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
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.
This code base contains PHP version specific code. To properly record and manage code coverage, there should be (at least) two code coverage builds, one against a low PHP version, one against a high PHP version, so I'd like to propose to run code coverage against PHP 5.3 and PHP 8.1, instead of against PHP 7.4.
Note: to implement this, see the example code I linked to in the earlier issue as this will need the COVERALLS_PARALLEL env and the coveralls-finish job, as well as a PHP version switch to a higher PHP version (for the PHP 5.3 run) for sending the coverage reports to Coveralls.
a91885f to
cee7c96
Compare
|
Thank you, I missed different code for php versions. I am add parallel coverage for 5.3 and 8.1. Iteresting part is using Example of coverage is https://coveralls.io/builds/46603511 Edit: in test section I let all PHP versions. There is running PHP unit, but also PHPLint. |
|
Please, @jrfnl, look to changes :-) |
I wouldn't worry about the linting for the PHP versions in the coverage run as if the code doesn't lint, the tests will fail anyway as 100% of the code is touched by the test run. If needs be, the lint step (only one step after all) can be duplicated in the coverage workflow, which is better than running two test builds for the same PHP versions. |
jrfnl
left a comment
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.
@grogy Nearly there!
Nice solution using the composer global require for the Coveralls package. 👍🏻
Makes sense to me and as the command is only for CI anyway, there is no pertinent reason to use a local install.
When the test run duplication is being resolved (see previous comment) and PHP 5.3 is no longer run in the test job, the "Setup ini config" step can be removed from the test job as it is then only needed in the coverage job.
Same for the "Composer: remove PHPCS" step, which is also only needed for the PHP 5.3 build.
Last note: the coveralls-finish job has a condition to prevent running on forks, but the coverage job does not. Either both should have that condition or neither.
341773d to
392c7a3
Compare
|
Thank you @jrfnl , again you have interesting and correct points. 👍
|
jrfnl
left a comment
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.
🎉
|
@grogy Want to do a call again to plan out how we'll get the main Parallel Lint repo sorted as well ? If so, when would suit you ? |
|
@jrfnl I will send you a messenge on Twitter this week ;) |
Link to UI https://coveralls.io/github/php-parallel-lint/PHP-Console-Highlighter
Closes #32