2021-09-22 19:28:17 +00:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push: ~
|
|
|
|
pull_request: ~
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 10 # Don't run forever when stale
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
python-version:
|
2022-04-20 19:28:31 +00:00
|
|
|
- '3.6'
|
|
|
|
- '3.7'
|
|
|
|
- '3.8'
|
|
|
|
- '3.9'
|
|
|
|
- '3.10'
|
2022-12-07 19:30:58 +00:00
|
|
|
- '3.11'
|
2021-09-22 19:28:17 +00:00
|
|
|
|
|
|
|
name: Python ${{ matrix.python-version }}
|
|
|
|
steps:
|
2022-12-07 19:32:01 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-22 19:28:17 +00:00
|
|
|
|
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Cached PIP dependencies
|
2022-12-07 19:32:01 +00:00
|
|
|
uses: actions/cache@v3
|
2021-09-22 19:28:17 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cache/pip
|
|
|
|
~/.tox/python/.pytest_cache
|
|
|
|
key: pip-${{ matrix.python-version }}-${{ hashFiles('setup.py', 'tox.ini') }}
|
|
|
|
restore-keys: pip-${{ matrix.python-version }}-
|
|
|
|
|
2021-09-22 19:38:24 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pip install tox
|
|
|
|
|
2021-09-22 19:28:17 +00:00
|
|
|
- name: Run tests
|
2021-09-22 19:38:24 +00:00
|
|
|
run: tox
|
2021-09-22 19:28:17 +00:00
|
|
|
|
|
|
|
- name: Code coverage upload
|
2022-12-07 19:32:01 +00:00
|
|
|
uses: codecov/codecov-action@v3
|