[pre-commit.ci] pre-commit autoupdate #189
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Coverage | |
"on": | |
push: | |
branches: [main] | |
pull_request: | |
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency. | |
# This will ensure that only one commit will be running tests at a time on | |
# each PR. | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: "${{ matrix.platform.name }} - Python (${{ matrix.python.version }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- {name: Linux, distro: ubuntu-latest, pip_cache_path: ~/.cache/pip} | |
python: | |
- {version: 3.7, tox: py37} | |
- {version: 3.8, tox: py38} | |
- {version: 3.9, tox: py39} | |
- {version: "3.10", tox: py310} | |
runs-on: ${{ matrix.platform.distro }} | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v3 | |
- uses: actions/cache@v3.0.11 | |
with: | |
path: ${{ matrix.platform.pip_cache_path }} | |
key: "pip-${{ matrix.platform.name }}-\ | |
python-${{ matrix.python.version }}-\ | |
${{ hashFiles('**/requirements/*.txt') }}" | |
- uses: actions/setup-python@v4 | |
with: | |
# Version range or exact version of a Python version to use, using | |
# SemVer's version range syntax | |
python-version: ${{ matrix.python.version }} | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
- name: Install tox | |
run: | | |
pip install tox | |
- name: Run tests | |
run: | | |
tox -e ${{ matrix.python.tox }} | |
- uses: codecov/codecov-action@v3 | |
with: | |
env_vars: OS,PYTHON | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) |