Skip to content

Commit

Permalink
Update run_unit_tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
johmedr authored Nov 21, 2024
1 parent c865c91 commit c66706e
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ jobs:
command: |
fileID = fopen('matlab_path.txt', 'w');
matlabpath = matlabroot;
matlabpath = strrep(matlabpath, filesep, '/');
matlabpath = strrep(matlabpath, '\', '\\');
fprintf(fileID, matlabpath);
fclose(fileID);
# sometimes this step hangs when closing matlab, automatically terminating after 2 minutes solves the issue
Expand All @@ -70,14 +72,6 @@ jobs:
matlab_path=$(cat matlab_path.txt)
echo "MATLAB_PATH=$matlab_path" >> $GITHUB_ENV
- name: Try to import SPM Python (Mac)
if: matrix.platform == 'Mac'
run: mwpython -c "import spm;"

- name: Try to import SPM Python (Windows, Linux)
if: matrix.platform != 'Mac'
run: python -c "import spm;"

- name: Run tests (Mac Apple Silicon)
if: matrix.os_name == 'macOS_Apple_Silicon'
run: |
Expand All @@ -86,6 +80,7 @@ jobs:
${{ env.MATLAB_PATH }}/bin/maca64:\
${{ env.MATLAB_PATH }}/sys/os/maca64:\
${{ env.MATLAB_PATH }}/extern/bin/maca64"
export PYTHONHOME=${{ env.pythonLocation }}
mwpython -m unittest discover tests -v
- name: Run tests (Mac Intel)
Expand All @@ -96,13 +91,14 @@ jobs:
${{ env.MATLAB_PATH }}/bin/maci64:\
${{ env.MATLAB_PATH }}/sys/os/maci64:\
${{ env.MATLAB_PATH }}/extern/bin/maci64"
export PYTHONHOME=${{ env.pythonLocation }}
mwpython -m unittest discover tests -v
- name: Run tests (Windows)
shell: bash
if: matrix.os_name == 'Windows'
shell: bash
run: |
export PATH=%PATH%;D:\hostedtoolcache\windows\MATLAB\2024.2.999\x64\runtime\win64;D:\hostedtoolcache\windows\MATLAB\2024.2.999\x64\runtime\win32
export PATH=$PATH;${{ env.MATLAB_PATH }}/runtime/win64;${{ env.MATLAB_PATH }}/runtime/win32
python -m unittest discover tests -v
- name: Run tests (Linux)
Expand Down

0 comments on commit c66706e

Please sign in to comment.