2020-12-20 15:40:40 +00:00
|
|
|
name: Tests
|
2021-12-24 19:06:47 +00:00
|
|
|
"on": # quotes ensure this is never parsed as `true`
|
2020-12-20 15:40:40 +00:00
|
|
|
schedule:
|
|
|
|
- cron: "0 11 * * 5"
|
|
|
|
push:
|
|
|
|
branches:
|
2021-03-29 18:01:14 +00:00
|
|
|
- main
|
2022-01-06 02:14:02 +00:00
|
|
|
- dev
|
2022-02-02 20:54:27 +00:00
|
|
|
- deps
|
2020-12-20 15:40:40 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-03-29 18:01:14 +00:00
|
|
|
- main
|
2020-12-20 15:40:40 +00:00
|
|
|
jobs:
|
|
|
|
tests:
|
|
|
|
name: ${{ matrix.name }}
|
2021-12-24 19:06:47 +00:00
|
|
|
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
2020-12-20 15:40:40 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2021-09-02 13:49:42 +00:00
|
|
|
# See the following link for all available Python versions:
|
|
|
|
# https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
|
2021-12-24 19:06:47 +00:00
|
|
|
- {name: '3.10', python: '3.10', tox: py310}
|
|
|
|
- {name: '3.9', python: '3.9', tox: py39}
|
|
|
|
- {name: '3.8', python: '3.8', tox: py38}
|
|
|
|
- {name: '3.7', python: '3.7', tox: py37}
|
2022-01-31 21:30:18 +00:00
|
|
|
- {name: PyPy3.7, python: pypy-3.7, tox: pypy37}
|
|
|
|
- {name: PyPy3.8, python: pypy-3.8, tox: pypy38}
|
2021-12-24 19:06:47 +00:00
|
|
|
# - {name: Mac, python: '3.10', tox: py310, os: macos-latest}
|
|
|
|
# - {name: Windows, python: '3.10', tox: py310, os: windows-latest}
|
2020-12-20 15:40:40 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
2021-12-24 19:06:47 +00:00
|
|
|
cache: pip
|
|
|
|
cache-dependency-path: ${{ matrix.reqs || 'requirements/tests.txt' }}
|
2022-01-06 02:14:02 +00:00
|
|
|
- run: pip install -U pip && pip install -U setuptools wheel
|
2021-12-24 19:06:47 +00:00
|
|
|
- name: cache .hypothesis dir
|
2020-12-20 15:40:40 +00:00
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: .hypothesis
|
|
|
|
key: hypothesis|${{ runner.os }}|${{ matrix.python }}
|
|
|
|
- run: pip install tox
|
|
|
|
- run: tox -e ${{ matrix.tox }}
|
|
|
|
# https://github.com/codecov/codecov-action
|
|
|
|
- name: Upload coverage to Codecov
|
2021-10-13 22:22:13 +00:00
|
|
|
uses: codecov/codecov-action@v2
|
2021-10-23 20:12:55 +00:00
|
|
|
# coverage only enabled for "py37" and "py310" envs in tox.ini
|
|
|
|
if: matrix.tox == 'py37' || matrix.tox == 'py310'
|
2021-10-13 22:22:13 +00:00
|
|
|
with:
|
|
|
|
verbose: true
|
|
|
|
fail_ci_if_error: true
|