Skip to content

Finalize UG documentation #123

Finalize UG documentation

Finalize UG documentation #123

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
run_test_site:
name: ${{ matrix.os }}-py${{ matrix.PYTHON_VERSION }}${{ matrix.LABEL }}
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 30
env:
MPLBACKEND: agg
PIP_ARGS: --upgrade -e
PYTEST_ARGS: --pyargs hyperspy --reruns 3 -n 2 --instafail
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
PYTHON_VERSION: ['3.8', '3.9']
PIP_SELECTOR: ['[all, tests, coverage]']
include:
# test oldest supported version of main dependencies on python 3.7
- os: ubuntu
PYTHON_VERSION: '3.7'
PIP_SELECTOR: '[all, tests, coverage]'
OLDEST_SUPPORTED_VERSION: true
DEPENDENCIES: matplotlib==3.1.3 numpy==1.19.0 scipy==1.4 imagecodecs==2020.1.31 tifffile==2020.2.16 dask==2.11.0 distributed==2.11.0 scikit-image==0.15 numba==0.52 scikit-learn==1.0.1
LABEL: -oldest
# test minimum requirement
- os: ubuntu
PYTHON_VERSION: '3.8'
PIP_SELECTOR: '[tests, coverage]'
LABEL: -minimum
# Run coverage
- os: ubuntu
PYTHON_VERSION: '3.7'
PIP_SELECTOR: '[all, tests, coverage]'
- os: ubuntu
PYTHON_VERSION: '3.8'
PIP_SELECTOR: '[all, tests, coverage]'
- os: ubuntu
PYTHON_VERSION: '3.10'
PIP_SELECTOR: '[all, tests, coverage]'
- os: ubuntu
PYTHON_VERSION: '3.11'
PIP_SELECTOR: '[all, tests, coverage]'
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: ${{ matrix.PYTHON_VERSION }}
- name: Display version
run: |
python --version
pip --version
- name: Install numba rc
if: contains(matrix.PYTHON_VERSION, '3.11')
# Require for python 3.11 support, remove when numba 0.57 is release
shell: bash
run: |
pip install numba --pre
- name: Install oldest supported version
if: ${{ matrix.OLDEST_SUPPORTED_VERSION }}
run: |
pip install ${{ matrix.DEPENDENCIES }}
- name: Install
shell: bash
run: |
pip install ${{ env.PIP_ARGS }} .'${{ matrix.PIP_SELECTOR }}'
- name: Pip list
run: |
pip list
- name: Run test suite
run: |
pytest ${{ env.PYTEST_ARGS }} --cov=. --cov-report=xml
- name: Upload coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v3