joergbrech / moxunit-action

A Github action for Matlab or Octave unit tests
MIT License
14 stars 7 forks source link

0% coverage report from codecov #13

Open Remi-Gau opened 3 years ago

Remi-Gau commented 3 years ago

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: https://github.com/bids-standard/bids-matlab/pull/124#issuecomment-775039023

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?

joergbrech commented 3 years ago

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?

Remi-Gau commented 3 years ago

Good catch but no luck.

The warnig is now gone but still getting a 0% coverage... :cry:

joergbrech commented 3 years ago

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:

https://github.com/joergbrech/moxunit-action/blob/6bb722203b09fd5d44e7be58a23f54b8c1596758/.github/workflows/test.yml#L67-L83

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.

Remi-Gau commented 3 years ago

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...

https://github.com/Remi-Gau/bids-matlab/pull/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 :see_no_evil:)

joergbrech commented 3 years ago

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... :shrug: I will check it out

Remi-Gau commented 3 years ago

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 "+") ?

joergbrech commented 3 years ago

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?

Remi-Gau commented 3 years ago

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