Skip to content

tox

tox #1416

Workflow file for this run

name: tox
on:
create: # is used for publishing to PyPI and TestPyPI
tags: # any tag regardless of its name, no branches
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- "main"
tags-ignore:
- "**"
pull_request:
schedule:
- cron: 1 0 * * * # Run daily at 0:01 UTC
jobs:
build:
name: ${{ matrix.tox_env }}
runs-on: ubuntu-latest
# limit potential endless looks like we had with build-containers
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- tox_env: lint
python-version: "3.10"
- tox_env: py37
python-version: 3.7
- tox_env: py38,py38-devel
python-version: 3.8
- tox_env: py39
python-version: 3.9
- tox_env: py310
python-version: "3.10"
- tox_env: py311,py311-devel
python-version: "3.11"
- tox_env: packaging
python-version: "3.10"
steps:
- uses: actions/checkout@v4
- name: Install a default Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install "tox>=4.0.2" "coverage[toml]>=6.5.0"
- name: Run tox -e ${{ matrix.tox_env }}
run: tox -e ${{ matrix.tox_env }}
continue-on-error: ${{ matrix.experimental || false }}
- name: Upload coverage data
uses: codecov/codecov-action@v4
with:
name: ${{ matrix.tox_env }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true # optional (default = false)
if: ${{ startsWith(matrix.tox_env, 'py') }}
check:
if: always()
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}