-
Notifications
You must be signed in to change notification settings - Fork 104
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 @cover annotation in test-load file and add support for codecov #1586
Add @cover annotation in test-load file and add support for codecov #1586
Conversation
@sarthak-19 Welcome, and thanks for opening this! I just stumbled upon the PR and left a couple of comments for things that caught my eye. |
@swissspidy Thank you so much for the feedback. I've addressed those and looking forward to keep improving 😄 |
I am really glad to see I have been try to get into core ten+ years |
Apologies for the delayed response, made the suggested changes. cc : @westonruter |
@sarthak-19 That looks right! |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @sarthak.jaiswal@rtCamp.com. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
@sarthak-19 Thank you for the PR! This looks quite solid, a few suggestions and questions.
- Implemented alerted of failures. - append commit SHA to avoid chance of conflicts
FYI: I've added 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.
I suppose the one job will continue to fail since this PR was opened from a fork. I'll leave it to Felix to approve and merge.
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.
Thanks for the PR @sarthak-19, LGTM!
Before we merge though: Doesn't one of us has to configure / set up this project on https://about.codecov.io/ first? 🤔
@felixarntz I believe it's all already configured according to the steps listed at https://app.codecov.io/gh/WordPress/performance The only thing outstanding is the third step, which is to merge into the preferred branch: I'll do so now! |
I've been chatting with @thelovekesh about what's going on. For one, we're missing some additional
These need to instead be, respectively: npm run test-php -- -- --coverage-clover=coverage-${{ github.sha }}.xml and npm run test-php-multisite -- -- --coverage-clover=coverage-multisite-${{ github.sha }}.xml Additionally, the coverage report for each plugin is getting overwritten to the same XML file. There needs to be separate XML files generated for each plugin. Lovekesh has some additional thoughts. |
I've opened #1652 to disable Codecov for the time being. |
Summary
This PR adds
@cover
annotation for test cases and add .yml file that can be used to configure codecov for automated test coverage in github actions.Addresses #1284
Relevant technical choices
I've addressed the following file
plugins/webp-uploads/tests/test-load.php
for adding@cover
annotation, if the approach is approved will extend this to other files.