Merge pull request #122 from minrk/doc-link #249
This file contains hidden or 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: continuous-integration | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
# ref: https://github.com/pre-commit/action | |
- uses: pre-commit/[email protected] | |
- name: Help message if pre-commit fail | |
if: ${{ failure() }} | |
run: | | |
echo "You can install pre-commit hooks to automatically run formatting" | |
echo "on each commit with:" | |
echo " pre-commit install" | |
echo "or you can run by hand on staged files with" | |
echo " pre-commit run" | |
echo "or after-the-fact on already committed files with" | |
echo " pre-commit run --all-files" | |
tests: | |
runs-on: ubuntu-24.04 | |
strategy: | |
matrix: | |
include: | |
# Only test oldest supported and latest python version to reduce | |
# GitHub API calls, as they can get rate limited | |
- python-version: 3.9 | |
- python-version: 3.x | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[testing] | |
- name: Run tests | |
env: | |
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pytest --verbose --color=yes --durations=10 | |
docs: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.13 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[sphinx] | |
- name: Build docs | |
run: | | |
cd docs | |
make dirhtml |