Modernize packaging and update to support pymc > v4 #187
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: Mac/Linux tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
schedule: | |
- cron: "0 11 * * 1" # Mondays @ 7AM Eastern | |
jobs: | |
tests: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- name: Python 3.10 with minimal dependencies and coverage | |
os: ubuntu-latest | |
python: "3.10" | |
toxenv: py310-test-cov | |
- name: Python 3.10 | |
os: ubuntu-latest | |
python: '3.10' | |
toxenv: py310-test | |
- name: Python 3.9 dev dependencies (allowed failure! check logs) | |
os: ubuntu-latest | |
python: 3.9 | |
toxenv: py39-test-devdeps | |
toxposargs: --durations=50 || true # override exit code | |
# Mac: | |
- name: Python 3.10 standard tests (macOS) | |
os: macos-latest | |
python: "3.10" | |
toxenv: py310-test | |
# Older Python versions: | |
- name: Python 3.9 with oldest supported version of all dependencies | |
os: ubuntu-latest | |
python: 3.9 | |
toxenv: py39-test-oldestdeps | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
if: "!startsWith(matrix.os, 'windows')" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
# Mac: | |
- name: Setup Mac - hdf5 | |
if: startsWith(matrix.os, 'mac') | |
run: | | |
brew install hdf5 | |
brew install c-blosc # See: https://github.com/PyTables/PyTables/issues/828 | |
brew link c-blosc | |
# Any *nix: | |
- name: Install Python dependencies - nix | |
if: "!startsWith(matrix.os, 'windows')" | |
run: python -m pip install --upgrade tox | |
- name: Run tests - nix | |
if: "!startsWith(matrix.os, 'windows')" | |
run: tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} | |
- name: Check coverage.yml existence | |
if: "endsWith(matrix.name, 'coverage')" | |
id: check_files | |
uses: andstor/file-existence-action@v1 | |
with: | |
files: "coverage.xml" | |
- name: Upload coverage report to codecov | |
uses: codecov/codecov-action@v1 | |
if: steps.check_files.outputs.files_exists == 'true' && endsWith(matrix.name, 'coverage') | |
with: | |
file: ./coverage.xml # optional | |
- uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
path: ./result_images |