-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add token instructions to codecov-action #16
Conversation
Since 4v this is required. For this to work, adding a `CODECOV_TOKEN` action secret needs to be added to the GH repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already had this, but it didn't work out well.
I tested the secrets: inherit
option from the calling workflow from control_toolbox repository, but inside my fork I didn't have the token specified obviously. how does this work from our repos as well as from forks?
btw: you can test this with a calling workflow, where you specifiy your repo for the reusable workflow. |
This seems required for reusable workflows
I'll play around with that... |
secrets: | ||
CODECOV_TOKEN: | ||
required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is not required if we use secrets: inherit
?
Note: If the secrets are inherited by using
secrets: inherit
in the calling workflow, you can reference them even if they are not explicitly defined in the on key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure whether this is then also unnecessary on the reusable workflow. I'm currently merely testing things, hence the draft state. I'm having the impression that things aren't sorted out with codecov's v4 action, though. With this version I'm having different trouble Commit creating failed: ["Service not found: none"]
which seems to pop up in codecov/feedback#263. There seems to be a workaround, but I expect that runs us into codecov/codecov-action#1287. There seems to be work around this, e.g. codecov/codecov-action@f62c5ee.
We might consider going back to v3 until things are sorted out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested the same in the comment below ;)
it seems that v4 has lots of issues, and similar reported errors |
Without the custom path I got this working: https://app.codecov.io/gh/fmauch/control_toolbox/tree/test_coverage with corresponding https://github.com/fmauch/control_toolbox/actions/runs/8086437364/job/22096586430 and https://github.com/fmauch/control_toolbox/blob/test_coverage/.github/workflows/build-coverage.yml |
Let's check if this works also from forks: fmauch/control_toolbox#1 |
https://github.com/fmauch/control_toolbox/actions/runs/8095478742/attempts/1: "Secret CODECOV_TOKEN is required, but not provided while calling." I can update this PR to not requiring it as an input and see whether inheriting works. |
If we can simply use `inherit: true` in the calling workflow that would be nice.
Yep, that seems to be working: https://github.com/fmauch/control_toolbox/actions/runs/8095478742/job/22122490451 |
Great:
You changed now my PR for ros-controls/control_toolbox. but let's merge this one first. We always can revert it ;) |
Ah sorry, I didn't realize you were using the same branch. for creating the PR at my fork. Regarding the |
Co-authored-by: Felix Exner (fexner) <git@fexner.de>
Since 4v this is required. For this to work, adding a
CODECOV_TOKEN
action secret needs to be added to the GH repository.This should fix our problems on uploading the code coverage as discussed in ros-controls/control_toolbox#188. Closes #15
In the target repo a secret has to be added in the project settings:
**
**
The token can be extracted on codecov.io.