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

CI: Initial code coverage configuration with Codecov #3905

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

echoix
Copy link
Member

@echoix echoix commented Jun 19, 2024

This PR is the first step enabling code coverage in the grass repo.

It will require authorizing the Codecov app for the repo, and then adding the CODECOV_TOKEN to the repository secrets.
Follow the steps here: https://docs.codecov.com/docs/quick-start

For this first iteration, it enables code coverage only for the simplest code coverage step. In python only, through pytest, without any multiple test workers running. I made sure that a no-code change didn't make a variation in the covered lines.

@echoix echoix requested a review from wenzeslaus June 19, 2024 15:38
@echoix echoix added this to the 8.5.0 milestone Jun 19, 2024
@echoix
Copy link
Member Author

echoix commented Jun 19, 2024

@neteler I made a request to authorize the Codecov application to the repo, but Vacláv wasn't admin enough to approve it by himself. Could you take a look into it, and add the token to the repository secrets as detailed in the guide linked in the description?

@github-actions github-actions bot added the CI Continuous integration label Jun 19, 2024
@neteler
Copy link
Member

neteler commented Jun 20, 2024

I have tried to activate it but get stuck here:

I think I have activated it, working on the secret.

@neteler
Copy link
Member

neteler commented Jun 20, 2024

@echoix
Copy link
Member Author

echoix commented Jun 20, 2024

Yep, it looks like that. In the first image, it was the grass-gis organisation instead of OSGeo.

@echoix
Copy link
Member Author

echoix commented Jun 20, 2024

So that means that the configuration is nearly complete. I'll merge main into the PR to really test the upload, as I'm surprised the coverage info is already there (probably from my branch)

@echoix
Copy link
Member Author

echoix commented Jun 20, 2024

So, the upload worked, and appears correctly, the change from the merge did something, so that means that this enablement PR is ready. Future PRs will be able to compare what changed or not, and upload other reports from different code coverage environments (c/c++ from gcov, unittest ones, pytest with parallel tests, macOS, etc.). Having this will enable to confirm each of the testing infrastructure change is equivalent or better.

For this on-boarding period, the checks are non failing (informational: true), no comments are posted, etc. It is the bare bones until we get used to it.

@neteler
Copy link
Member

neteler commented Jun 20, 2024

It will require authorizing the Codecov app for the repo, and then adding the CODECOV_TOKEN to the repository secrets.

I have now added the CODECOV_TOKEN from https://app.codecov.io/github/OSGeo/grass/settings under https://github.com/OSGeo/grass/settings/secrets/actions

@neteler neteler self-assigned this Jun 20, 2024
@echoix
Copy link
Member Author

echoix commented Jun 20, 2024

So it is done now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants