Skip to content

Commit

Permalink
feat: fail action bast on matlab exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
mihai-sysbio committed Jun 19, 2023
1 parent 672e0a8 commit 6ac87c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/yaml-conversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ jobs:

- name: Run conversion script
run: |
set -e
/usr/local/bin/matlab -nodisplay -nosplash -nodesktop -r "addpath(genpath('.')); testYamlConversion"
exit 1
11 changes: 6 additions & 5 deletions code/test/testYamlConversion.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@

% compare the imported model from yaml with the original one
if ~isequal(model, importedHumanGEM)
error('::error::Re-imported model is diffrent from export');
disp('::error::Re-imported model is diffrent from export');
exit(1);
end

% model conversion between Matlab and Yaml files is successful
disp('The conversion was successful.')
catch
error('::error::There are problems during the conversion import and export');
disp('::error::There are problems during the conversion import and export');
exit(1)
end

% model conversion between Matlab and Yaml files is successful
disp('The conversion was successful.')
exit(0)

0 comments on commit 6ac87c4

Please sign in to comment.