1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
name: CI
on:
pull_request:
push:
branches: [ main ]
tags: '*'
workflow_dispatch:
schedule:
# Weekly cron
- cron: '0 8 * * 1'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Code style checks
os: ubuntu-latest
python-version: 3.x
toxenv: codestyle
# Linux - test different Sphinx versions
- os: ubuntu-latest
python-version: '3.10'
toxenv: py310-test-sphinx_oldest
- os: ubuntu-latest
python-version: '3.10'
toxenv: py310-test-sphinx62
- os: ubuntu-latest
python-version: '3.10'
toxenv: py310-test-sphinx70
- os: ubuntu-latest
python-version: '3.10'
toxenv: py310-test-sphinx71
- os: ubuntu-latest
python-version: '3.11'
toxenv: py311-test-sphinx72-cov-clocale
- os: ubuntu-latest
python-version: '3.12'
toxenv: py312-test-sphinx80
- os: ubuntu-latest
python-version: '3.12'
toxenv: py312-test-sphinx81
- os: ubuntu-latest
python-version: '3.13'
toxenv: py313-test-sphinx82
- os: ubuntu-latest
python-version: '3.14'
toxenv: py314-test-sphinx90
- os: ubuntu-latest
python-version: '3.14'
toxenv: py314-test-sphinxdev
# MacOS X - just the stable and dev
- os: macos-latest
python-version: '3.11'
toxenv: py311-test-sphinx90-clocale
- os: macos-latest
python-version: '3.14'
toxenv: py314-test-sphinxdev
# Windows - just the oldest, stable, and dev
- os: windows-latest
python-version: '3.10'
toxenv: py310-test-sphinx_oldest
- os: windows-latest
python-version: '3.13'
toxenv: py313-test-sphinx90
- os: windows-latest
python-version: '3.14'
toxenv: py314-test-sphinxdev
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install graphviz on Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install graphviz
- name: Install graphviz on OSX
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install graphviz
- name: Install graphviz on Windows
if: startsWith(matrix.os, 'windows')
run: choco install graphviz
- name: Install tox
run: python -m pip install tox
- name: Run tox
run: tox ${{ matrix.toxargs }} -v -e ${{ matrix.toxenv }}
- name: Upload coverage to codecov
if: ${{ contains(matrix.toxenv,'-cov') }}
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
file: ./coverage.xml
|