Skip to content

test

test #8

name: test
on:
schedule:
# 5 pm every first day of a month
- cron: '0 5 1 * *'
# 5 pm every 15th day of a month
- cron: '0 5 15 * *'
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
run-test-suite:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.11'] # hatch env defines its own matrix with python versions
env:
# https://github.com/microsoft/azure-pipelines-tasks/issues/16426
# https://github.com/orgs/community/discussions/26434
MPLBACKEND: Agg
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Ensure latest pip
run: python -m pip install --upgrade pip
- name: Install hatch
run: |
pip install hatch
- if: matrix.python-version == '3.11' && runner.os == 'Linux'
name: Formatter & Linter
run: hatch run format:check
- if: matrix.python-version == '3.11' && runner.os == 'Linux'
name: Build docs
run: hatch run docs:build
- if: matrix.python-version == '3.11' && runner.os == 'Linux'
name: Run test matrix
run: |
hatch -e test run versions
hatch -e test run pytest