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

0% coverage report from codecov #13

Open
Remi-Gau opened this issue Feb 8, 2021 · 8 comments
Open

0% coverage report from codecov #13

Remi-Gau opened this issue Feb 8, 2021 · 8 comments

Comments

@Remi-Gau
Copy link
Contributor

Remi-Gau commented Feb 8, 2021

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?

@joergbrech
Copy link
Owner

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
Copy link
Contributor Author

Remi-Gau commented Feb 8, 2021

Good catch but no luck.

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

@joergbrech
Copy link
Owner

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.

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Feb 9, 2021

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 🙈)

@joergbrech
Copy link
Owner

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

@Remi-Gau
Copy link
Contributor Author

Remi-Gau commented Feb 9, 2021

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
Copy link
Owner

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
Copy link
Contributor Author

Remi-Gau commented Feb 9, 2021

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

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

2 participants