forked from OSIPI/TF2.4_IVIM-MRI_CodeCollection
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.59 KB
/
unit_test.yml
File metadata and controls
42 lines (38 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Unit tests
on: [pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13"]
exclude:
- os: windows-latest
python-version: "3.13"
# Windows chokes on py3.13: https://github.com/numpy/numpy/issues/27894
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
pip install -r requirements.txt
- name: Install libomp (macOS)
if: runner.os == 'macOS'
run: brew install libomp
- name: Test with pytest
run: |
pip install pytest pytest-cov
python -m pytest --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html -r w ${{ runner.os == 'macOS' && '-k "not test_deep_learning_algorithms"' || '' }}
python -m pytest --doctest-modules --junitxml=junit/test-results-brain.xml --cov=. --cov-report=xml --cov-report=html --dataFile tests/IVIMmodels/unit_tests/generic_brain.json -r w -k test_ivim_fit_saved