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 f2482ac commit c865c91
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,8 @@ jobs:
- name: Check out SPM Python
uses: actions/checkout@v4

- name: Install Numpy and Scipy
run: python -m pip install numpy scipy

- name: Install SPM Python
run: pip install -e .

- 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;"
run: python -m pip install -e .

# Setup MATLAB and Runtime
- name: Set up MATLAB
Expand All @@ -74,12 +63,20 @@ jobs:
# sometimes this step hangs when closing matlab, automatically terminating after 2 minutes solves the issue
timeout-minutes: 2
continue-on-error: true

- name: Set environment variable with MATLAB path
shell: bash # Works on Windows as well because of shell: bash
run: |
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'
Expand Down

0 comments on commit c865c91

Please sign in to comment.