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

Missing Params in action.yml #154

Open
Sysix opened this issue Feb 11, 2024 · 4 comments
Open

Missing Params in action.yml #154

Sysix opened this issue Feb 11, 2024 · 4 comments

Comments

@Sysix
Copy link

Sysix commented Feb 11, 2024

I tried to follow the README.md to setup my badge for the project.

Sadly the workflow is failing with following message:

Warning: Unexpected input(s) 'file-name', 'badge-branch', 'github-token', valid inputs are ['coverage-file-name']

You can see my failing github action here:
https://github.com/Sysix/lexoffice-php-api/actions/runs/7858298399/job/21443108397

My workflow:
https://github.com/Sysix/lexoffice-php-api/blob/development/.github/workflows/coverage-report.yml#L61

@chris48s
Copy link
Member

The warnings are annoying, but they're not the failure. It is just a log message. That will happen when everything is working as expected, so that's annoying but it isn't what went wrong here. There is a bit more detail on this in action-badges/core#10

Looking at the log for your job, the last line in the output just prints out the entire contents of https://raw.githubusercontent.com/action-badges/cobertura-coverage-xml-badges/0.3.0/dist/index.js and then the output truncates so I'm not really able to see a useful error.

I had a look at the workflow, and the artifact from your latest build https://github.com/Sysix/lexoffice-php-api/actions/runs/7859730296/artifacts/1236172924

I think the actual problem here is that your XML coverage report isn't in cobertura format. It is in clover format:

https://github.com/Sysix/lexoffice-php-api/blob/8fa73e4a47230e3fe868cfe9510b5c7955c4ede0/.github/workflows/coverage-report.yml#L30-L31

So you'd need to either generate a coverage.xml in cobertura format, or switch to an action that can parse clover coverage format.

That said, the way this fails is not providing any helpful information so I definitely want to have a look at why the error reporting is not helpful here and improve it.

@Sysix
Copy link
Author

Sysix commented Feb 11, 2024

So you'd need to either generate a coverage.xml in cobertura format, or switch to an action that can parse clover coverage format.

That will be the error ;) I only looked only for XML because I already got frustrated with JSON only Support^^
I didnt't know there is also another XML format

@kiyote
Copy link

kiyote commented Mar 7, 2024

That said, the way this fails is not providing any helpful information so I definitely want to have a look at why the error reporting is not helpful here and improve it.

I'm having a similar issue with the same giant dump of the source code, just to add to the "I'm curious if there's clearer error logging on the way" crowd.

@chris48s
Copy link
Member

@kiyote this is a bit of a late follow-up, but if you update to 0.3.1 does that give you a sensible error message?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants