-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
base: main
Are you sure you want to change the base?
Conversation
@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? |
I have tried to activate it I think I have activated it, working on the secret. |
It seems to do something: https://app.codecov.io/github/OSGeo/grass/tree/echoix%2Fgrass%3Ainitial-pytest-codecov-configuration |
Yep, it looks like that. In the first image, it was the grass-gis organisation instead of OSGeo. |
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) |
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. |
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 |
So it is done now |
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.