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

[CY-6704] Upload coverage via workflow_run #67

Closed
rageagainsthepc opened this issue Dec 9, 2022 · 4 comments
Closed

[CY-6704] Upload coverage via workflow_run #67

rageagainsthepc opened this issue Dec 9, 2022 · 4 comments
Labels
jira-issue Issue tracked on JIRA

Comments

@rageagainsthepc
Copy link

rageagainsthepc commented Dec 9, 2022

Hi,

I want to upload coverage reports from github workflows triggered by the workflow_run event in order to be able to access secrets even for coverage data coming from forks. Since these workflows are run from the default branch of the repository, they will be associated with an incorrect commit sha and are therefore not recognized as coverage data belonging to a feature branch. My idea was to pass the correct commit sha manually when uploading, but it does not look like the commit sha is explicitly passed anywhere here in this action. Do you have an idea how to solve this?
Thanks in advance.

@github-actions github-actions bot changed the title Upload coverage via workflow_run [CY-6704] Upload coverage via workflow_run Dec 9, 2022
@github-actions github-actions bot added the jira-issue Issue tracked on JIRA label Dec 9, 2022
@github-actions
Copy link

github-actions bot commented Dec 9, 2022

Internal ticket created : CY-6704

@SchoolGuy
Copy link

I would like to put myself in CC for this ticket.

Codecov has a solution for this that is working reliably (I do not know how the implementation is working for them). The solution provided here is not sufficient because that means that the changes introduced to the workflows themselves cannot be tested anymore. Thus experiments need to be done to the target branch which leads to unnecessary cluttering of the target/stable branch.

I have a ticket in my project which tracks my efforts (atm none) in this regard: cobbler/cobbler#3379

If the Codacy team requires a "guinea pig" for testing purposes I would like to volunteer here as this would obsolete yet another separate tool in the workflow for my contributors (which is why I switched away from Codecov for coverage).

@DMarinhoCodacy
Copy link
Contributor

Hello @rageagainsthepc,

Thanks for your report.

This coverage-reporter-action is a smaller version of our coverage-reporter feature (find more info here: https://github.com/codacy/codacy-coverage-reporter). Our feature supports what you need to pass the commit sha when you upload coverage reports.

Small example:

bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r <coverage_report.extension_of_the_file> --commit-uuid

@lolgab
Copy link
Contributor

lolgab commented Mar 25, 2024

This is now fixed by codacy/codacy-coverage-reporter#492
Please, feel free to re-open if the action is not getting the correct commit SHA by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-issue Issue tracked on JIRA
Projects
None yet
Development

No branches or pull requests

4 participants