-
Notifications
You must be signed in to change notification settings - Fork 64
Coverage report doesn't appear on the Overview tab #42
Description
I've set up a GitHub Actions workflow to report my test code coverage to Code Climate. The workflow uses this action. As a result, the coverage report appears in the project settings:
![]() |
![]() |
|---|
But doesn't appear on the Overview tab in Code Climate:
I've directed this issue to the Code Climate support, they said that the branch name (provided by this action) must me master instead of refs/heads/master.
The full conversation
Code Climate:
Hi Surgie,
Thanks for reaching out! Happy to help and point you in the right direction.
I haven't seen this GitHub Action before -- pretty cool! I'm not sure how to make changes to the GitHub Action to make this work for you, but here's what we see on our side:
On the backend, I do see that we're successfully receiving payloads for this repo (last commit f40b844b); however, they each identify your master branch as:
refs/heads/masterTo help resolve this error, we generally recommend making the path above ^^ relative to the project root.
- You can do this by adding the
--prefixflag to your to your CI's coverage configuration.- More information is in our docs here.
- It should look something like
--prefix /[path to directory]This removes absolute paths in coverage payloads to make them relative to the project root. This is usually the directory in which the tests were run.
(You could also instruct your test setup to start at the root of your project.)
Again, I'm not sure how to make the above work with the GitHub Action. You might need to open an issue with the maintainer on the project itself: https://github.com/paambaati/codeclimate-action/issues
-> Once you've made changes to your setup, could you try pushing a brand new commit to master?
Let me know if you have any questions, or if there's anything else I can help with. I'll be standing by to help further.
Thanks,
Emily
I:
Hi!
I used the same PhpUnit setup and CLI command with a plain cc-test-reporter command in another repository and it worked fine. Also the reported coverage is shown in the Code section but not in the Overview section.
Will the problem be solved if my action sends the same report but with branch
masterinstead ofrefs/heads/master?I’ll make an issue in the action repository and attach our conversation.
Code Climate:
Hi Surgie,
Thanks for the additional info.
Will the problem be solved if my action sends the same report but with
branchmaster instead ofrefs/heads/master?Yes! That should do the trick 👌
Let me know once you're able to get that working! I'd love to make some notes for troubleshooting for anyone else who runs into the same.
Thanks,
EmilyPS: I couldn't find the output for the coverage info it in your Workflow logs, but I did some branch name troubleshooting earlier with another GitHub Workflow user.
his setup reported branch names to be HEAD
and I recommended this stackflow conversation(here's the coverage-related Workflow logs from the other user)
Please also consider that a branch can have a slash in its name, e.g. a gitflow-style branch feature/name.


