-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Compilation of jenkins-contribution-*
GO applications does not publish CodeCoverage report
#4142
Comments
triaged: Related to #4017 , added to milestone, taken by @lemeurherve and/or @dduportal |
@jmMeessen according to the doc you linked, we should add an API token to the repository, obtained from the CodeCov account. How can we access this CodeCov account? |
I wonder if we should not create a codecov account for |
Signing up doesn't seem possible from an email: https://about.codecov.io/sign-up/ |
Requested permissions when using GitHub to sign up: WDTY of creating a GitHub account named like "jenkins-infra-service-account" (or something equivalent), with 2FA enabled via oathtool like for #4073, that could be used to subscribe to this type of service without any risk? |
That is an excellent idea! Are you ok to take care of this account creation? |
Account created: https://github.com/jenkins-infra-service-account Next steps:
|
jenkins-ccontributor-*
GO applications does not publish CodeCoverage reportjenkins-contribution-*
GO applications does not publish CodeCoverage report
According to https://docs.codecov.com/docs/quick-start#prerequisites,
We need to install https://github.com/apps/codecov GitHub App to these two repositories. WDYT @dduportal? |
LGTM! Let's review the expected permission before performing the effective installation (e.g. you can start the process, check the requested permissions, report here and if it looks safe you'll be able to finish the installation) |
I installed the CodeCov GitHub App on these 2 repositories: Working on this issue and on #4141 I noticed that previously defined repository secrets were imported, and were overriding organization secret in case of I tried a GitHub Action run with the
As jenkins-infra-service-account is only a regular member of @jenkins-infra organization and not an admin, we can't generate a CodeCov API token covering jenkins-infra org. And that worked, cf the "Upload coverage report to CodeCov" step of https://github.com/jenkins-infra/jenkins-contribution-aggregator/actions/runs/9584808001/job/26441218787 I then applied the same for the other repository:
I reran a "Test" job to confirm CodeCov correct upload from this second repository: https://github.com/jenkins-infra/jenkins-contribution-extractor/actions/runs/9580302254/job/26441497327job/26441422043 And finally I removed the unused The CodeCov badges have been updated on both READMEs, from: Note: the free CodeCov account has only one personal seat but has up to 5 seats available for the jenkins-infra organization if needed (I unticked the "auto-activate member" setting which was enabled by default): |
Confirmed working for jenkins-contribution-aggregator, CodeCov report uploaded on jenkins-infra/jenkins-contribution-aggregator#40 merge:
|
I confirm too that the CodeCoverage upload appears to work. The real test of the feature will be when opening a PR with actual code changes. I am thus closing this issue as completed. Thank you @lemeurherve to have thoroughly investigated this and found the adequate solution. 👍 |
Service(s)
GitHub
Summary
The code coverage automation doesn't work anymore for the two GO tools (see #4017 ). It requires at least an API token so that the coverage data can be uploaded. See https://docs.codecov.com/docs/adding-the-codecov-token
It is a handy feature especially as it fails the build if new code is added via a PR and is not covered by 80% coverage. A good reminder not to forget automated tests.
This is not a blocking issue but the loss of a handy feature.
Reproduction steps
No response
The text was updated successfully, but these errors were encountered: