Remove Coveralls tooling and add inline coverage report#717
Merged
Conversation
Collaborator
Author
|
@dd32 I noticed that WP core has switched to Codecov for coverage reporting. Could we have this enabled for this repository as well? |
kasparsd
commented
Sep 5, 2025
| "require-dev": { | ||
| "automattic/vipwpcs": "^3.0", | ||
| "dealerdirect/phpcodesniffer-composer-installer": "^1.0", | ||
| "php-coveralls/php-coveralls": "^2.8", |
Collaborator
Author
There was a problem hiding this comment.
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", |
Collaborator
Author
There was a problem hiding this comment.
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"> |
Collaborator
Author
There was a problem hiding this comment.
Converting to the new format supported by phpunit v9 and later.
This was referenced Sep 5, 2025
Closed
Member
@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: |
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?
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