WordPress / WordPress/performance
Configure Codecov for Per-Directory Coverage Badges
@ShyamGadde is already working on this.
Since Mar 18, 2025.
- Dominant language
- PHP
- Stars
- 461
- Forks
- 165
- Avg merge
- 11h 12m
- Merged PRs (30d)
- 28
Description
Summary
Related https://github.com/WordPress/performance/issues/1789#issuecomment-2731163370
We need to configure Codecov to display coverage badges for each plugin directory in our repository. This will allow us to track and display code coverage metrics on a per-directory basis, providing more granular insights into our codebase.
Details
Currently, our Codecov setup provides an overall coverage badge for the entire repository. We want to enhance this by showing individual coverage badges for each plugin directory.
Steps to Achieve This
-
Update GitHub Actions Workflow: Modify the
.github/workflows/php-test-plugins.ymlfile to include flags for each plugin when uploading coverage reports to Codecov. -
Configure Codecov YAML: Create or update the
codecov.ymlfile to define the flags for each plugin directory.
Expected Outcome
- Each plugin directory will have its own coverage badge.
- The badges will be displayed in the README , providing clear visibility into the coverage status of each plugin.
Additional Information
- Reference: Codecov Flags Documentation
cc : @westonruter
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.