-
Notifications
You must be signed in to change notification settings - Fork 171
Remove Coveralls tooling and add inline coverage report #717
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
|
@dd32 I noticed that WP core has switched to Codecov for coverage reporting. Could we have this enabled for this repository as well? |
| "require-dev": { | ||
| "automattic/vipwpcs": "^3.0", | ||
| "dealerdirect/phpcodesniffer-composer-installer": "^1.0", | ||
| "php-coveralls/php-coveralls": "^2.8", |
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 package doesn't support PHP 8.1 or later until php-coveralls/php-coveralls#359 is merged.
| "lint-compat": "phpcs -p --standard=PHPCompatibilityWP --runtime-set testVersion 7.2- --extensions=php --ignore='tests/,dist/,includes/Yubico/,vendor/,node_modules/' .", | ||
| "lint-phpstan": "phpstan analyse --verbose --memory-limit=1G", | ||
| "test": "vendor/bin/phpunit", | ||
| "test": "phpunit --coverage-text", |
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 now prints a nice summary:
Code Coverage Report:
2025-09-05 08:44:35
Summary:
Classes: 8.33% (1/12)
Methods: 46.29% (81/175)
Lines: 58.21% (801/1376)
@Two.Factor::Two_Factor_Totp
Methods: 76.19% (16/21) Lines: 91.41% (117/128)
@Two_Factor::Two_Factor_Backup_Codes
Methods: 76.92% (10/13) Lines: 96.34% ( 79/ 82)
@Two_Factor::Two_Factor_Core
Methods: 45.45% (30/66) Lines: 59.79% (394/659)
@Two_Factor::Two_Factor_Dummy
Methods: 100.00% ( 5/ 5) Lines: 100.00% ( 9/ 9)
@Two_Factor::Two_Factor_Email
Methods: 57.89% (11/19) Lines: 64.38% ( 47/ 73)
@Two_Factor::Two_Factor_FIDO_U2F
Methods: 6.67% ( 1/15) Lines: 40.68% ( 48/118)
@Two_Factor::Two_Factor_Provider
Methods: 54.55% ( 6/11) Lines: 73.33% ( 22/ 30)
\u2flib_server::u2flib_server\U2F
Methods: 18.18% ( 2/11) Lines: 62.04% ( 85/137)
| <include> | ||
|
|
||
| <filter> | ||
| <whitelist addUncoveredFilesFromWhitelist="false" processUncoveredFilesFromWhitelist="false"> |
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.
Converting to the new format supported by phpunit v9 and later.
@kasparsd Sure, I've set it up with a repo secret per https://app.codecov.io/github/WordPress/two-factor here's the instructions it provided: |
What?
Remove
php-coverallspackages since we're no longer pushing coverage to https://coveralls.io/github/WordPress/two-factor (it was last active when Travis was still used). Note that WP core has switched to Codecov https://app.codecov.io/github/wordpress/wordpress-developEnable phpunit coverage during local and CI runs.
Why?
How?
Testing Instructions
Screenshots or screencast
Changelog Entry