* update pre-commit hooks * add devcontainer * show url in publish environment * update actions versions * separate typing job * use dependabot grouped updates ignore upload/download-artifact until slsa updates * use sphinx.ext.extlinks instead of sphinx-issues * update editorconfig * update gitignore * update .readthedocs.yaml * license is txt, readme is md * use pyproject.toml and flit_core instead of setuptools add typed classifier add pyright config simplify urls * tox builds docs in place * add tox env to update all dev dependencies * update issue and pr templates * simplify matrix
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- '*.x'
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '*.md'
|
|
- '*.rst'
|
|
pull_request:
|
|
paths-ignore:
|
|
- 'docs/**'
|
|
- '*.md'
|
|
- '*.rst'
|
|
jobs:
|
|
tests:
|
|
name: ${{ matrix.name || matrix.python }}
|
|
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- {python: '3.12'}
|
|
- {name: Windows, python: '3.12', os: windows-latest}
|
|
- {name: Mac, python: '3.12', os: macos-latest}
|
|
- {python: '3.11'}
|
|
- {python: '3.10'}
|
|
- {python: '3.9'}
|
|
- {python: '3.8'}
|
|
- {python: '3.7'}
|
|
- {name: PyPy, python: 'pypy-3.10', tox: pypy310}
|
|
steps:
|
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
allow-prereleases: true
|
|
cache: pip
|
|
cache-dependency-path: requirements*/*.txt
|
|
- run: pip install tox
|
|
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
|
|
typing:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
|
|
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
|
|
with:
|
|
python-version: '3.x'
|
|
cache: pip
|
|
cache-dependency-path: requirements*/*.txt
|
|
- name: cache mypy
|
|
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
|
|
with:
|
|
path: ./.mypy_cache
|
|
key: mypy|${{ hashFiles('pyproject.toml') }}
|
|
- run: pip install tox
|
|
- run: tox run -e typing
|