Skip to content

Commit

Permalink
Update codecov.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronBrennan1 authored Nov 5, 2024
1 parent b33b46b commit 0aca224
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,22 @@ jobs:
sudo chmod -R 755 /opt/MOcov
- name: Run MATLAB tests with coverage
run: |
run: >
matlab -batch "
addpath(genpath('/opt/MOcov'));
addpath(genpath('test'));
addpath(genpath('src'));
mocov('start');
results = runtests('test_myfunction.m');
assert(all([results.Passed]), 'Some tests failed');
mocov('stop');
mocov('-cover', 'src', '-cover_xml_file', 'coverage.xml');
exit;"
try
addpath(genpath('/opt/MOcov'));
addpath(genpath('test'));
addpath(genpath('src'));
mocov('start');
results = runtests('test_myfunction.m');
assert(all([results.Passed]), 'Some tests failed');
mocov('stop');
mocov('-cover', 'src', '-cover_xml_file', 'coverage.xml');
exit(0);
catch e
disp(getReport(e));
exit(1);
end"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down

0 comments on commit 0aca224

Please sign in to comment.