Skip to content

[skip changelog] Enable Codecov reports on pull requests #1783

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

Merged
merged 2 commits into from
Jun 27, 2022
Merged

[skip changelog] Enable Codecov reports on pull requests #1783

merged 2 commits into from
Jun 27, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Jun 24, 2022

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • [N/A] Tests for the changes have been added (for bug fixes / features)
  • [N/A] Docs have been added / updated (for bug fixes / features)
  • [N/A] UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Infrastructure enhancement

What is the current behavior?

Code coverage is an important metric of quality, efficiency, and sustainability of the development and maintenance of a software project.

Although it is commendable that an above average coverage level has been achieved in this project, the current level is still not sufficient.

No meaningful attention is given to the overall coverage level and impact of each specific proposal on coverage.

What is the new behavior?

Codecov will now automatically comment on relevant pull requests to provide a report of the code coverage impact that would result from the proposed changes:

https://docs.codecov.com/docs/pull-request-comments

These comments are valuable for several reasons:

  • Brings test deficiencies to the contributor's attention
  • Encourages contributors to improve PRs that originally had insufficient test coverage for the added code
  • Facilitates the review process for the maintainers
  • Increases awareness of code coverage trends in the project (the Codecov website is great for this, but likely rarely visited)

Does this PR introduce a breaking change, and is titled accordingly?

No breaking change.

Other information

The "Test Go" workflow was updated to support the alternative Codecov configuration filename used by this project.

This reverts commit 5c9eee3.

Codecov will now automatically comment on pull requests to provide a report of the code coverage impact that would
result from the proposed changes.

These comments are valuable for several reasons:

- Brings test deficiencies to the contributor's attention
- Encourages contributors to improve PRs that originally had insufficient test coverage for the added code
- Facilitates the review process for the maintainers
- Increases awareness of code coverage trends in the project (the Codecov website is great for this, but likely rarely visited)
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Jun 24, 2022
@per1234 per1234 requested a review from umbynos June 24, 2022 22:36
@per1234 per1234 self-assigned this Jun 24, 2022
…decov configuration paths

For the sake of efficiency, the "Test Go" GitHub Actions workflow is configured to run only when relevant files are
modified. Since the workflow uploads code coverage data to Codecov, the Codecov configuration file is one of these files.

The standard filename for the Codecov configuration file is codecov.yml, and the workflow's path filter was configured
for that filename. It turns out an alternative filename is also recognized: .codecov.yml, which is used by this project.
Two subfolders are also supported in addition to the root of the repository as locations for the configuration file.

The workflow's paths filter was not configured for the alternative filename and locations, meaning the workflow would
not be triggered on change to the Codecov configuration in projects that use the alternative configuration file name or
locations.

The workflow's paths filter is hereby configured to recognize changes to any valid Codecov configuration file.
@per1234 per1234 merged commit 124c35d into arduino:master Jun 27, 2022
@per1234 per1234 deleted the codecov-comment branch June 27, 2022 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants