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

Code Coverage github action #202

Merged
merged 6 commits into from
Mar 15, 2024

Conversation

jagerber48
Copy link
Contributor

Adjust CI github action to upload code coverage to codecov.io.

Copy link

codecov bot commented Mar 13, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@jagerber48
Copy link
Contributor Author

Looks like I got this action working. See https://app.codecov.io/github/lmfit/uncertainties/tree/jagerber48%2Funcertainties%3Afeature%2Fcodecov_github_action.

I made the choice to only upload from the ubuntu-latest os test and python version 3.11. This was because I once heard the suggestion to upload latest minus one so you have some time to fix coverage in case in changes when a new latest python is released.

No strong opinions on which version to publish coverage for.

An alternative possibility is to use flags to denote results from different runs, but I haven't totally gotten flags to work, and this strategy feels like overkill. Just mentioning it for completeness.

This PR will close #195

@reneeotten
Copy link
Collaborator

I think you should be uploading the coverage for all tests and Codecov will combine them.

@jagerber48
Copy link
Contributor Author

I think you should be uploading the coverage for all tests and Codecov will combine them.

Ok I’ll switch to that.

I was worried about how results are interpreted if the coverage is different on different versions. But it’s no problem not to worry about that. I once saw a bug along those lines but it was due to a bug involving coverage and python <= 3.9 I think. Unless the source code branches based on OS or Python version I can’t imagine why there would be meaningful coverage differences between different tests.

Copy link
Member

@newville newville left a comment

Choose a reason for hiding this comment

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

Thanks - that looks good to me

@newville
Copy link
Member

@jagerber48 OK, let's try merging this one next...

@newville newville merged commit 05361a7 into lmfit:master Mar 15, 2024
18 checks passed
@jagerber48 jagerber48 deleted the feature/codecov_github_action branch March 15, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants