bidict/.github/workflows/tests.yml

54 lines
1.9 KiB
YAML
Raw Normal View History

name: Tests
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:
name: ${{ matrix.name }}
2021-12-24 19:06:47 +00:00
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
include:
# 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}
- {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}
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' }}
- run: pip install -U pip && pip install -U setuptools wheel
2021-12-24 19:06:47 +00:00
- name: cache .hypothesis dir
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
# 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