Skip to content

Test

Test #1009

Workflow file for this run

name: Test
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 0 * * 0' # @weekly
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pip and tox
run: python -m pip install --upgrade pip tox
- name: Format Python version for tox
id: py_tox_version
uses: frabert/[email protected]
with:
pattern: '(\d)\.(\d)'
string: ${{ matrix.python-version }}
replace-with: '$1$2'
- name: Run tox
env:
TOXENV: ${{ format('py{0}-{1}', steps.py_tox_version.outputs.replaced, runner.os) }}
run: tox --skip-missing-interpreters false
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Build docs
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install pip and tox
run: python -m pip install --upgrade pip tox
- name: Run tox
run: tox --skip-missing-interpreters false -e docs
lint:
name: Run linters
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install pip and tox
run: python -m pip install --upgrade pip tox
- name: Run tox
run: tox --skip-missing-interpreters false -e lint