bidict/.github/workflows/test.yml

53 lines
1.8 KiB
YAML

name: Test
"on": # quotes ensure this is never parsed as `true`
schedule:
- cron: "0 11 * * 5"
push:
branches:
- main
- dev
- deps
pull_request:
branches:
- main
jobs:
tests:
name: ${{ matrix.pyversion }}
runs-on: ubuntu-latest # Skip Mac and Windows as nothing in bidict varies by OS.
strategy:
fail-fast: false
matrix:
include:
# https://github.com/actions/setup-python#available-versions-of-python
- {pyversion: '3.11.0-beta - 3.11.*', tox: py311}
- {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:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.pyversion }}
cache: pip
cache-dependency-path: requirements/tests.txt
- run: pip install -U pip && pip install -U setuptools wheel
- name: cache .hypothesis dir
uses: actions/cache@v3
with:
path: .hypothesis
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
uses: codecov/codecov-action@v2
# coverage only enabled for "py37" and "py310" envs in tox.ini
if: matrix.tox == 'py37' || matrix.tox == 'py310'
with:
verbose: true
fail_ci_if_error: false # https://github.com/codecov/codecov-action/issues/557