Closed bendichter closed 3 years ago
FYI, we do actually generate code coverage in the form of a coverage.xml
Cobertura XML file automatically. This was originally intended for use with a Jenkins CI.
Oh cool. Does that just cover Java code or also MATLAB code?
I believe this covers MATLAB code so all we would need to do is have a way to actually view the XML file. It's been a while since I've looked at this and I'm not familiar with Cobertura so I'd have to investigate it further but all the heavy lifting regarding code coverage should be there already.
Code coverage can be viewed through the azure pipeline here: https://dev.azure.com/NeurodataWithoutBorders/matnwb/_build?definitionId=4
I've also added a coverage badge in README.
Code coverage can be viewed through the azure pipeline here: https://dev.azure.com/NeurodataWithoutBorders/matnwb/_build?definitionId=4
I've also added a coverage badge in README.
Sorry to lurk on closed issues, but I'm, just excited you guys are getting set up with this. FYI, you may be interested in this service:
https://blogs.mathworks.com/developer/2018/04/17/codecov-and-cobertura/
Feel free to lurk, @acampbel ! We definitely appreciate the tips. For some reason, I had assumed cobertura output was not readable by codecov.io. Thanks for letting us know otherwise! I made PR #260 to update the CI to upload the coverage report to codecov. Super easy. Thanks!
It looks like Codecove currently does not show the line-by-line coverage for individual files correctly, i.e., it shows a GitHub API: Forbidden error with the message Is the path +types/+untyped/DataPipe.m a relative path in your repository? E.g., for DataPipe.m https://codecov.io/gh/NeurodataWithoutBorders/matnwb/src/master/%2Btypes/%2Buntyped/DataPipe.m
@oruebel Hm, interesting. I do not see that error when logged in to codecov. I'll look into it.
It looks like an issue with codecov and public (non-logged-in) access:
This is caused by rate limiting on the public user used to call the API to fetch the source code for display. We have requested a rate increase for this user and apologize for the inconvenience.
https://www.mathworks.com/help/matlab/ref/matlab.unittest.plugins.codecoverage-package.html