| 1 |
name: Tests |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: |
| 5 |
- main |
| 6 |
- '*.x' |
| 7 |
paths-ignore: |
| 8 |
- 'docs/**' |
| 9 |
- '*.md' |
| 10 |
- '*.rst' |
| 11 |
pull_request: |
| 12 |
branches: |
| 13 |
- main |
| 14 |
- '*.x' |
| 15 |
paths-ignore: |
| 16 |
- 'docs/**' |
| 17 |
- '*.md' |
| 18 |
- '*.rst' |
| 19 |
jobs: |
| 20 |
tests: |
| 21 |
name: ${{ matrix.name }} |
| 22 |
runs-on: ubuntu-latest |
| 23 |
strategy: |
| 24 |
fail-fast: false |
| 25 |
matrix: |
| 26 |
include: |
| 27 |
- {name: '3.11', python: '3.11', tox: py311} |
| 28 |
- {name: 'Lowest', python: '3.11', tox: py311-min} |
| 29 |
- {name: '3.10', python: '3.10', tox: py310} |
| 30 |
- {name: '3.9', python: '3.9', tox: py39} |
| 31 |
- {name: '3.8', python: '3.8', tox: py38} |
| 32 |
- {name: 'Typing', python: '3.11', tox: typing} |
| 33 |
steps: |
| 34 |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 |
| 35 |
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 |
| 36 |
with: |
| 37 |
python-version: ${{ matrix.python }} |
| 38 |
cache: 'pip' |
| 39 |
cache-dependency-path: 'requirements/*.txt' |
| 40 |
- name: cache mypy |
| 41 |
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 |
| 42 |
with: |
| 43 |
path: ./.mypy_cache |
| 44 |
key: mypy|${{ matrix.python }}|${{ hashFiles('requirements/mypy.txt') }} |
| 45 |
if: matrix.tox == 'typing' |
| 46 |
- run: pip install tox |
| 47 |
- run: tox r -e ${{ matrix.tox }} |