Run tests - 21e26ba51bfdcaf68c15a975447229ac2a21d00c #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
run-name: Run tests - ${{ github.sha }} | |
on: push | |
env: | |
OPENBLAS_NUM_THREADS: 1 | |
jobs: | |
run_test: | |
strategy: | |
matrix: | |
# NOTE: Python 3.12 is not supported yet | |
config: | |
[ | |
{os: ubuntu-20.04, py: '3.8'}, | |
{os: ubuntu-20.04, py: '3.9'}, | |
{os: ubuntu-20.04, py: '3.10'}, | |
{os: ubuntu-20.04, py: '3.11'}, | |
{os: ubuntu-latest, py: '3.8'}, | |
{os: ubuntu-latest, py: '3.9'}, | |
{os: ubuntu-latest, py: '3.10'}, | |
{os: ubuntu-latest, py: '3.11'} | |
# {os: ubuntu-20.04, py: '3.12'}, | |
# {os: macos-latest, py: '3.8'}, | |
# {os: macos-latest, py: '3.9'}, | |
# {os: macos-latest, py: '3.10'}, | |
# {os: macos-latest, py: '3.11'}, | |
# {os: macos-latest, py: '3.12'}, | |
# {os: macos-14, py: '3.10'}, | |
# {os: macos-14, py: '3.11'}, | |
# {os: macos-14, py: '3.12'} | |
] | |
name: Python ${{ matrix.config.py }} on ${{ matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
- name: Download data | |
working-directory: tests | |
run: | | |
curl -L -O https://github.com/daducci/COMMIT/wiki/files/demo01_data.zip | |
curl -L -O https://github.com/daducci/COMMIT/wiki/files/demo01_fibers.tck | |
7z x demo01_data.zip | |
mv demo01_fibers.tck demo_data | |
mv demo01_data/* demo_data | |
- name: Set up Python ${{ matrix.config.py }} | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: ${{ matrix.config.py }} | |
- name: Install dmri-commit | |
run: pip install . --no-cache-dir | |
- name: Force numpy version | |
run: python -m pip install "numpy<2.0.0" | |
- name: Run test | |
id: run_test | |
working-directory: tests | |
run: | | |
echo "Run tests" | |
python test_demo.py | |
continue-on-error: true | |
- name: Check on failures | |
if: steps.run_test.outcome != 'success' | |
run: | | |
echo "Test failed" | |
exit 1 |