bidict/.github/workflows/test.yml

53 lines
1.8 KiB
YAML
Raw Normal View History

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`
schedule:
- cron: "0 11 * * 5"
push:
branches:
2021-03-29 18:01:14 +00:00
- main
- dev
2022-02-02 20:54:27 +00:00
- deps
pull_request:
branches:
2021-03-29 18:01:14 +00:00
- main
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.
strategy:
fail-fast: false
matrix:
include:
2022-06-02 02:04:36 +00:00
# https://github.com/actions/setup-python#available-versions-of-python
- {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}
steps:
2022-06-02 02:04:36 +00:00
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
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
- 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
with:
path: .hypothesis
2022-06-02 02:04:36 +00:00
key: hypothesis|${{ runner.os }}|${{ matrix.pyversion }}
- 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
# 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