2022-03-23 20:56:16 +00:00
|
|
|
name: Test
|
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:
|
2022-06-02 02:04:36 +00:00
|
|
|
name: ${{ matrix.pyversion }}
|
|
|
|
runs-on: ubuntu-latest # Skip Mac and Windows as nothing in bidict varies by OS.
|
2020-12-20 15:40:40 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2022-06-02 02:04:36 +00:00
|
|
|
# https://github.com/actions/setup-python#available-versions-of-python
|
2022-06-03 19:29:19 +00:00
|
|
|
- {pyversion: '3.11.0-beta - 3.11.*', tox: py311}
|
2022-06-02 02:04:36 +00:00
|
|
|
- {pyversion: '3.10', tox: py310}
|
|
|
|
- {pyversion: '3.9', tox: py39}
|
|
|
|
- {pyversion: '3.8', tox: py38}
|
|
|
|
- {pyversion: '3.7', tox: py37}
|
|
|
|
- {pyversion: pypy-3.9, tox: pypy39}
|
|
|
|
- {pyversion: pypy-3.8, tox: pypy38}
|
|
|
|
- {pyversion: pypy-3.7, tox: pypy37}
|
2020-12-20 15:40:40 +00:00
|
|
|
steps:
|
2022-06-02 02:04:36 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v3
|
2020-12-20 15:40:40 +00:00
|
|
|
with:
|
2022-06-02 02:04:36 +00:00
|
|
|
python-version: ${{ matrix.pyversion }}
|
2021-12-24 19:06:47 +00:00
|
|
|
cache: pip
|
2022-06-02 02:04:36 +00:00
|
|
|
cache-dependency-path: 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
|
2022-06-02 02:04:36 +00:00
|
|
|
uses: actions/cache@v3
|
2020-12-20 15:40:40 +00:00
|
|
|
with:
|
|
|
|
path: .hypothesis
|
2022-06-02 02:04:36 +00:00
|
|
|
key: hypothesis|${{ runner.os }}|${{ matrix.pyversion }}
|
2020-12-20 15:40:40 +00:00
|
|
|
- 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
|
2022-03-23 20:56:16 +00:00
|
|
|
fail_ci_if_error: false # https://github.com/codecov/codecov-action/issues/557
|