-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add PHP Code coverage report as a GitHub action #1915
Conversation
Coverage report for commit: e1696bc
Summary - Lines: 56.63% | Methods: 48.64%PHP unit test coverage |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1915 +/- ##
=========================================
Coverage ? 56.8%
Complexity ? 4097
=========================================
Files ? 456
Lines ? 17608
Branches ? 0
=========================================
Hits ? 9994
Misses ? 7614
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. |
5e48d0d
to
0910662
Compare
.codecov.yml
Outdated
layout: 'reach, diff, flags, files' | ||
behavior: default | ||
require_changes: 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.
These three seems for me like default options
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.
I thought so too, but apparently the default looked different without adding these settings. For example the graph (reach
) is not displayed by default. If you have a look at the edited link of the codecov comment you can see the history of what the comment looked like. I ran it quite a few times to get it to contain the sections I wanted.
I can take another look to see if there are additional sections we can omit but I tried to copy the defaults from the WooCommerce core yml
file.
I went ahead and removed more of those defaults as you suggested. I still left the comment.layout since I wasn't getting the |
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.
✅ LGTM
Changes proposed in this Pull Request:
Resolves part of #864
This PR adds a code coverage report as a PR comment. Since we run multiple unit tests in GitHub actions the coverage report is only generated once when the tests are run with the latest WP version and for PHP 8.0.
I've added the coverage using a flag
php-unit-tests
, the intention is to also include the coverage report for the JS unit tests, but that will be part of a followup PR.Detailed test instructions:
Changelog entry