Skip to content

dev updates (#41)

dev updates (#41) #728

Workflow file for this run

name: push actions
on: [push]
jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: ['3.12', '3.11', '3.10', '3.9', '3.8']
poetry-version: [1.8]
os: [ubuntu-22.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: poetry install
run: poetry install
# not running mypy against 3.11 (yet) because it's like 10x slower
- name: mypy 3.9-
if: matrix.python-version == 3.9 || matrix.python-version == 3.8
# exclude examples in CI because some 3.10 features are used
run: poetry run mypy . --exclude examples --exclude tests/test_310_plus.py --exclude tests/test_311_plus.py --exclude tests/test_39_plus.py
- name: mypy 3.11
if: matrix.python-version == 3.11 || matrix.python-version == 3.12
run: poetry run mypy .
- name: mypy 3.10
if: matrix.python-version == 3.10
run: poetry run mypy . --exclude tests/test_311_plus.py
- name: run 3.9- tests
if: matrix.python-version == 3.9 || matrix.python-version == 3.8
run: poetry run pytest --ignore tests/test_310_plus.py --ignore tests/test_311_plus.py --ignore examples --ignore tests/test_39_plus.py
- name: run 3.10 tests
if: matrix.python-version == 3.10
run: poetry run pytest --ignore tests/test_311_plus.py
- name: run 3.11/3.12 tests
if: matrix.python-version == 3.11 || matrix.python-version == 3.12
run: poetry run pytest --ignore tests/test_311_plus.py
- name: run all examples
if: matrix.python-version == 3.10
run: poetry run bash run_all_examples.sh
- name: linting 3.9-
if: matrix.python-version == 3.9 || matrix.python-version == 3.8 || matrix.python-version == 'pypy3.9'
run: poetry run flake8 --exclude codegen,bench,examples,tests/test_310_plus.py,tests/test_311_plus.py --ignore E721,E741,W503,F405,F403,F401
- name: linting 3.10+
if: matrix.python-version == 3.10 || matrix.python-version == 3.11 || matrix.python-version == 3.12
run: poetry run flake8 --exclude codegen --ignore E721,E741,W503,F405,F403,F401,DAR101,DAR201,DAR401
- name: darglint
run: poetry run darglint koda_validate
- name: doctests
if: matrix.python-version == 3.10 || matrix.python-version == 3.11 || matrix.python-version == 3.12
run: cd docs && poetry run make doctest
- name: benchmarks
run: poetry run python -m bench.run