simplify tests pipeline #332
Workflow file for this run
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: tests | |
on: ['push', 'pull_request', 'workflow_call'] | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ['ubuntu-22.04'] | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.13' | |
- 'pypy-3.7' | |
- 'pypy-3.8' | |
- 'pypy-3.9' | |
- 'pypy-3.10' | |
tests: ['essential'] | |
include: | |
- os: macos-latest | |
python-version: '3.12' | |
tests: essential | |
- os: windows-latest | |
python-version: '3.11' | |
tests: essential | |
- os: ubuntu-latest | |
python-version: '3.10' | |
tests: extended | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Run essential tests | |
if: ${{ matrix.tests != 'extended' }} | |
run: | | |
pip install --quiet -e '.[cli,test]' | |
pytest | |
- name: Run extra linters and report coverage | |
if: ${{ matrix.tests == 'extended' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PYTHONHASHSEED: '1' | |
run: | | |
pip install --quiet -e '.[cli,test,lint]' | |
pytest --doctest-modules | |
python -m doctest HOWTO.md README.md | |
darglint --docstring-style google --strictness short nested_diff | |
pip install --quiet --upgrade coveralls | |
coveralls --service=github |