CI #211
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 | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 15 * * THU' # Every Thursday afternoon | |
jobs: | |
test: | |
name: 'Test' | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.12'] | |
os: ['ubuntu-latest'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install build tools | |
run: python3 -m pip install --upgrade pip setuptools wheel tox~=3.0 | |
- name: Run Tests | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py | |
test-py-versions: | |
name: 'Test Python versions' | |
needs: test | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
python: ['3.11', '3.10', '3.9', '3.8', 'pypy-3.10'] | |
os: ['ubuntu-latest'] | |
experimental: [false] | |
include: | |
- python: '3.13.0-alpha - 3.13.0' | |
experimental: true | |
os: 'ubuntu-latest' | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install build tools | |
run: python3 -m pip install --upgrade pip setuptools wheel tox~=3.0 | |
- name: Run Tests | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py | |
test-oses: | |
name: 'Test OSes' | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.12'] | |
os: ['windows-latest', 'macos-latest'] | |
experimental: [true] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install build tools | |
run: python3 -m pip install --upgrade pip setuptools wheel tox~=3.0 | |
- name: Run Tests | |
# Run tox using the version of Python in `PATH` | |
run: tox -e py | |
coverage: | |
name: 'Check coverage' | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: ['3.12'] | |
os: ['ubuntu-latest'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install build tools | |
run: python3 -m pip install --upgrade pip setuptools wheel tox~=3.0 | |
- name: Check coverage | |
run: tox -e coverage | |
lint-etc: | |
name: 'Linting and docs' | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python: [ '3.12' ] | |
os: [ 'ubuntu-latest' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install build tools | |
run: python3 -m pip install --upgrade pip setuptools wheel tox~=3.0 | |
- name: Check format | |
run: tox -e check-format | |
- name: Lint | |
run: tox -e flake8 refurb | |
- name: Security checks | |
run: tox -e bandit | |
- name: Check types | |
run: tox -e mypy | |
- name: Build docs | |
run: tox -e docs |