|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + runs-on: ${{ matrix.os }} |
| 8 | + strategy: |
| 9 | + max-parallel: 5 |
| 10 | + matrix: |
| 11 | + os: [ubuntu-22.04, windows-2022, macos-12, macos-14] |
| 12 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 13 | + |
| 14 | + steps: |
| 15 | + - uses: actions/checkout@v4 |
| 16 | + |
| 17 | + - name: Set up Python ${{ matrix.python-version }} |
| 18 | + uses: actions/setup-python@v5 |
| 19 | + with: |
| 20 | + python-version: ${{ matrix.python-version }} |
| 21 | + |
| 22 | + - name: Install dependencies |
| 23 | + run: | |
| 24 | + python -m pip install --upgrade pip |
| 25 | + python -m pip install -e ".[test,dask-image,itk,cli]" |
| 26 | +
|
| 27 | + - name: Install dependencies |
| 28 | + run: | |
| 29 | + python -m pip install --upgrade pip |
| 30 | + python -m pip install -e ".[test,dask-image,itk]" |
| 31 | + python -m pip install itkwasm-image-io |
| 32 | +
|
| 33 | + - name: Install dependencies |
| 34 | + run: | |
| 35 | + python -m pip install --upgrade pip |
| 36 | + python -m pip install -e ".[test,dask-image,itk,cli]" |
| 37 | +
|
| 38 | + - name: Test with pytest |
| 39 | + if: ${{ matrix.os != 'ubuntu-22.04' && matrix.os != 'macos-14' }} |
| 40 | + run: | |
| 41 | + pytest --junitxml=junit/test-results.xml |
| 42 | +
|
| 43 | + - name: Publish Test Report |
| 44 | + if: |
| 45 | + ${{ matrix.os != 'ubuntu-22.04' && (matrix.os != 'macos-14' || |
| 46 | + matrix.python-version != '3.8') }} |
| 47 | + uses: mikepenz/action-junit-report@v2 |
| 48 | + with: |
| 49 | + report_paths: "junit/test-results*.xml" |
0 commit comments