Closed michealroberts closed 3 years ago
Internal ticket created : CY-4822
It really seems that is failing due to the contents of your coverage/lcov.info
. Maybe somehow on your pipeline you are not making the file available to that job? Can you troubleshoot on your side, like dumping the content of that file location on that job step, to make sure that the coverage file exists and have the expected contents?
Hi @machadoit, thank you for your reply. The lcov.info file has been committed to source control, and it definitely there. It's inside a coverage directory, so ... perhaps I have the coverage-reports
flag incorrectly set ...
coverage-reports: coverage/lcov.info
Should this be:
coverage-reports: 'coverage/lcov.info'
or
coverage-reports: ['coverage/lcov.info']
or maybe there's a way to specify the base directory to coverage and upload files from there?
What do you think?
It should be fine as you have with coverage-reports: coverage/lcov.info
and you can see the bash code that tackles that argument at https://github.com/codacy/codacy-coverage-reporter-action/blob/master/action.yml#L32 ant it already put double-quotes wrapping the received value.
The lcov.info file has been committed to source control, and it definitely there
Keep in mind, that even if it is on the source control, does not mean that the GitHub action has access to it on that step. That is why I was suggesting for a dump of the file contents as part of a step on that job, so we can troubleshoot, if there is a 'actions/checkout@main' missing or something of sorts
@machadoit
Keep in mind, that even if it is on the source control, does not mean that the GitHub action has access to it on that step. That is why I was suggesting for a dump of the file contents as part of a step on that job, so we can troubleshoot, if there is a 'actions/checkout@main' missing or something of sorts
Awesome ... are you able to provide a snippet for this action ... I can return with the output today if that is helpful.
You can check the snipped on the README at https://github.com/codacy/codacy-coverage-reporter-action#githubworkflowscodacy-coverage-reporteryml it contains a - uses: actions/checkout@main
.
Or are you asking for an example to check the contents of the file? You could add a step with a cat
of the contents of the file. For a quick example on how to use an action with shell, you can check this action implementation at https://github.com/codacy/codacy-coverage-reporter-action/blob/master/action.yml#L22
Other than that, I am going to propose, for you to create a simple public repository with an example coverage file commited that you can share, and show it failing on the reporter itself. And then I can fork it an troubleshoot to understand if it is a plugin problem or not.
It has been a while since this thread was last active. I'll close it, but feel free to re-open it if you're still having this problem
I am not sure what else to provide other than the following:
I've tried a number of ways to alleviate this issue. All I can say is running the following locally works fine:
However, the action does not work.
I'm using as follows as part of a wider build:
Could anyone let me know what I have done wrong here?