joergbrech / moxunit-action

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

errors in coverage report #30

Closed jorgepz closed 1 year ago

jorgepz commented 1 year ago

Hi, I am having odd results in the coverage report generated using moxunit-action. My final goal is to get it working for the ONSAS.m but I created a much simpler repo to reproduce the errors and explain better.

I created this minimal repo where this simple test script is run https://github.com/jorgepz/Octave_Matlab_CI_Testbed/blob/master/test/moxunit_testWithCoverage.m the process goes well, both tests are executed and passed https://github.com/jorgepz/Octave_Matlab_CI_Testbed/actions/runs/4252541995/jobs/7396264753 but for some reason the coverage report show only part of the file executions of the last test https://app.codecov.io/gh/jorgepz/Octave_Matlab_CI_Testbed . This is the same behavior that i am seeing in the ONSAS repo.

I am aware that this could be a MOcov issue, but I was not able to run it locally yet.

Thanks in advance

joergbrech commented 1 year ago

Could clear all, close all be the problem?

jorgepz commented 1 year ago

Thanks for the reply! That indeed was affecting the results. After removing those the src files are now all hit, however it seems that none of the files in the examples folder is hit https://app.codecov.io/github/jorgepz/Octave_Matlab_CI_Testbed so there might be an error on how the dirpath is managed in my moxunit-action or in the mocov call. I am doing several tests on that in this PR https://github.com/jorgepz/Octave_Matlab_CI_Testbed/pull/15 I guess I will conclude on which is the correct way of doing this in brief or just desist on covering the examples path. Thanks again!

jorgepz commented 1 year ago

Fixed! https://app.codecov.io/gh/jorgepz/Octave_Matlab_CI_Testbed thanks @joergbrech !