CI Tests #557
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: CI Tests | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
schedule: | |
# run every Monday at 6am UTC | |
- cron: '0 6 * * 1' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
TOXARGS: '-v' | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: ${{ matrix.prefix }} ${{ matrix.os }}, ${{ matrix.tox_env }} | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.allow_failure }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python: '3.10' | |
tox_env: 'py310-test-alldeps' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.11' | |
tox_env: 'py311-test-alldeps' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.12' | |
tox_env: 'py312-test-alldeps-cov' | |
toxposargs: --remote-data=any | |
allow_failure: false | |
prefix: '' | |
- os: macos-latest | |
python: '3.12' | |
tox_env: 'py312-test-alldeps' | |
allow_failure: false | |
prefix: '' | |
- os: macos-14 | |
python: '3.12' | |
tox_env: 'py312-test-alldeps' | |
allow_failure: false | |
prefix: 'M1' | |
- os: windows-latest | |
python: '3.12' | |
tox_env: 'py312-test-alldeps' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.13' | |
tox_env: 'py313-test' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.12' | |
tox_env: 'codestyle' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.12' | |
tox_env: 'pep517' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.12' | |
tox_env: 'bandit' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.10' | |
tox_env: 'py310-test-oldestdeps' | |
allow_failure: false | |
prefix: '' | |
- os: ubuntu-latest | |
python: '3.13' | |
tox_env: 'py313-test-devdeps' | |
toxposargs: --remote-data=any | |
allow_failure: true | |
prefix: '(Allowed failure)' | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.python }} | |
allow-prereleases: true | |
- name: Install base dependencies | |
run: python -m pip install --upgrade pip setuptools tox | |
- name: Print Python, pip, setuptools, and tox versions | |
run: | | |
python -c "import sys; print(f'Python {sys.version}')" | |
python -c "import pip; print(f'pip {pip.__version__}')" | |
python -c "import setuptools; print(f'setuptools {setuptools.__version__}')" | |
python -c "import tox; print(f'tox {tox.__version__}')" | |
- name: Run tests | |
run: tox -e ${{ matrix.tox_env }} -- ${{ matrix.toxposargs }} | |
- name: Upload coverage to codecov | |
if: ${{ contains(matrix.tox_env, '-cov') }} | |
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0 | |
with: | |
files: ./coverage.xml | |
verbose: true |