-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (58 loc) · 2.73 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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/[email protected]
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