This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
tox #1177
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: 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: | |
tox_matrix: | |
name: ${{ matrix.tox_env }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- tox_env: linters | |
python-version: "3.10" | |
- tox_env: py38 | |
PREFIX: PYTEST_REQPASS=1 | |
python-version: 3.8 | |
- tox_env: py39 | |
PREFIX: PYTEST_REQPASS=1 | |
python-version: 3.9 | |
- tox_env: py310 | |
PREFIX: PYTEST_REQPASS=1 | |
python-version: "3.10" | |
- tox_env: py311 | |
PREFIX: PYTEST_REQPASS=1 | |
python-version: "3.11" | |
- tox_env: devel | |
PREFIX: PYTEST_REQPASS=1 | |
python-version: "3.11" | |
- tox_env: packaging | |
python-version: "3.10" | |
steps: | |
- name: Check out src from Git | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # needed by setuptools-scm | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
pip install tox | |
- name: Run tox -e ${{ matrix.tox_env }} | |
run: | | |
echo "${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}" | |
${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }} | |
check: # This job does nothing and is only used for the branch protection | |
if: always() | |
needs: | |
- tox_matrix | |
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) }} |