Skip to content
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

Setup Codecov uploading and reporting #124

Merged
merged 2 commits into from
Oct 18, 2024
Merged

Conversation

glatterf42
Copy link
Member

When studying failed CI builds, I often find having to scroll past the codecov report tedious. In the rest of the MESSAGE stack, codecov is configured differently: a bot is picking up changes in coverage and reporting them as comments on the PR. For the rest of the stack, these are not just comments, but hard checks: should the PR reduce the test coverage (by too much), it will be rejected.
We don't have a policy like this with ixmp4 at the moment, so I'm not going to change that immediately. However, this PR tries to converge the different reporting styles: I have enabled the codecov bot for this repo, added a CODECOV_TOKEN secret, and configured codecov so that it should leave comments on PRs about coverage both within the changes proposed as well as the whole project in an informational way, i.e. not rejecting the PR because of lowered coverage.

Please let me know what you think :)

@glatterf42 glatterf42 added the enhancement New feature or request label Oct 18, 2024
@glatterf42 glatterf42 self-assigned this Oct 18, 2024
@glatterf42
Copy link
Member Author

I think things are working as intended: the codecov checks for patch and project ran, but didn't produce a comment because the coverage is not changed by this PR.
Also, there's no base coverage to compare it to, yet, which would only be created by merging this PR. I infer this from the message here, which already shows a coverage that corresponds to the latest terminal outputs I have in memory for this PR.
And the terminal output does not include the coverage anymore :)

In all likelihood, the comments produced on future PRs would not include as many details as the terminal output did. However, this could be configured to our liking. Also, the dashboard on codecov (linked to from the individual PR checks) always includes more details per default.

Copy link
Contributor

@meksor meksor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks great! I was waiting for the comment to appear but what you say makes sense and I'll look at it when the next pr commit comes In :)

@glatterf42 glatterf42 merged commit 2df83c5 into main Oct 18, 2024
12 checks passed
@glatterf42 glatterf42 deleted the enh/setup-codecov-bot branch October 18, 2024 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants