Bump itk-elastix from 0.19.2 to 0.21.0 in /envs #1192
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
# GitHub Actions Continuous Integration workflow for MagellanMapper | |
# Based on initial template by GitHub Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-13, macos-latest, windows-latest] | |
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"] | |
dependencies: | |
- pinned | |
- fresh | |
exclude: | |
- os: ubuntu-latest | |
python-version: 3.6 | |
- os: macos-13 | |
python-version: 3.10 | |
- os: macos-13 | |
python-version: 3.11 | |
- os: macos-latest | |
python-version: 3.6 | |
- os: macos-latest | |
python-version: 3.7 | |
- os: macos-latest | |
python-version: 3.8 | |
- os: macos-latest | |
python-version: 3.9 | |
include: | |
- os: ubuntu-20.04 | |
python-version: 3.6 | |
dependencies: pinned | |
- os: ubuntu-20.04 | |
python-version: 3.6 | |
dependencies: fresh | |
env: | |
# set requirements path based on Python version | |
REQS: ${{ matrix.python-version == '3.6' && 'envs/requirements_py36' || matrix.python-version == '3.7' && 'envs/requirements_py37' || matrix.python-version == '3.8' && 'envs/requirements_py38' || 'envs/requirements.txt'}} | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
- name: Install VTK dependencies | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libsm6 libgl1-mesa-glx | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v3 | |
if: ${{ matrix.dependencies == 'pinned' }} | |
with: | |
# python environment path from setup-python | |
path: ${{ env.pythonLocation }} | |
# check for cache from the corresponding requirements file | |
key: ${{ env.pythonLocation }}-pip-${{ hashFiles(env.REQS) }} | |
- name: Set up dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
pip install flake8 | |
- name: Install pinned dependencies | |
if: ${{ matrix.dependencies == 'pinned' }} | |
env: | |
QT_QPA_PLATFORM: offscreen | |
run: | | |
pip install -r ${{ env.REQS }} | |
- name: Install fresh dependencies | |
if: ${{ matrix.dependencies == 'fresh' }} | |
env: | |
QT_QPA_PLATFORM: offscreen | |
run: | | |
pip install . | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude stitch | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude stitch | |
- name: Test with pytest | |
run: | | |
python -u -m magmap.tests.test_chunking | |
python -u -m magmap.tests.test_classifier | |
python -u -m magmap.tests.test_cv_nd | |
python -u -m magmap.tests.test_detector | |
python -u -m magmap.tests.test_libmag | |
python -u -m magmap.tests.test_np_io | |
# TODO: add UI testing | |
#python -u -m magmap.tests.test_visualizer | |
# TODO: add image artifacts | |
#python -u -m magmap.tests.test_img_equality | |
#python -u -m magmap.tests.unit_testing |