joergbrech/moxunit-action

0% coverage report from codecov

Opened this issue ยท 8 comments

I am getting some strange reports from codecov from the output from the moxunit-action.

My tests passes, the coverage differences show some changes, but it still tells me I am hitting 0 lines.

See here: bids-standard/bids-matlab#124 (comment)

I could take it up with codecov but I would like to make sure it does not come from moxunit action or moxunit first.

Any idea or pointer?

Hmm, I am not sure what the problem here is. The unit tests seem to run and a coverage report is uploaded.

But I noticed a warning in the codecov action:
https://github.com/bids-standard/bids-matlab/runs/1853916765?check_suite_focus=true#step:9:26
See also here: https://community.codecov.io/t/cant-get-codecov-to-work-with-monorepo/2462

I don't know if it is related, but have you tried checking out your repo with fetch-depth=2?

Good catch but no luck.

The warnig is now gone but still getting a 0% coverage... ๐Ÿ˜ข

Hmm, maybe its just your one PR that is stale since some of the previous uploads to codecov didn't succeed:

So with some luck, it will work on subsequent Pull Requests.

Can you check one more thing? Could you upload the coverage.xml file as an artifact to check the coverage manually? See here for an example:

test-cover-xml-file:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Run unit tests
uses: ./
with:
src: tests/src
cover_xml_file: coverage.xml
- uses: actions/upload-artifact@v1
with:
name: coverage_file
path: coverage.xml
- uses: codecov/codecov-action@v1
with:
file: ./coverage.xml

If we have zero coverage in the xml-file, then this is a moxunit/moxunit-action bug. If no, than this is a codecov issue.

Hmm, maybe its just your one PR that is stale since some of the previous uploads to codecov didn't succeed:

* https://app.codecov.io/gh/bids-standard/bids-matlab/pulls?page=1&state=open&order=-pullid

* https://community.codecov.io/t/cant-get-codecov-to-work-with-monorepo/2462/13

Somehow I am getting the same result on a PR on my own repo...

Remi-Gau/bids-matlab#21

Can you check one more thing? Could you upload the coverage.xml file as an artifact to check the coverage manually? See here for an example:

OK I added the upload artifact... But how do I then view it and where? (I am such a noob ๐Ÿ™ˆ)

Yeah, it took me a while to find the artifacts as well ๐Ÿ˜ They are hidden in the Summary of your action run: https://github.com/bids-standard/bids-matlab/actions/runs/549348089

If you open the file you see that you really have no line hits, so this is not a codecov issue. Seems like we need to dig deeper... ๐Ÿคท I will check it out

Yeah, it took me a while to find the artifacts as well stuck_out_tongue_closed_eyes They are hidden in the Summary of your action run: https://github.com/bids-standard/bids-matlab/actions/runs/549348089

Sweet !! Thanks.

If you open the file you see that you really have no line hits, so this is not a codecov issue. Seems like we need to dig deeper... shrug I will check it out

Let me know if I can help your search. One possibility: Is the potential issue related to the fact that this "package" code (folder start with "+") ?

Yes that seems to be the problem. I cloned your repo, removed the + from the directory names and generated the coverage report manually with https://github.com/MOcov/MOcov and I get a nonzero coverage. I just don't know exactly what the problem is. So maybe raise an issue at https://github.com/MOcov/MOcov?

You're the best !!!! Will raise an issue there!!!