Skip to content

Commit

Permalink
Ci: Test on Sphinx 8 / Dev. (sphinx-contrib#259)
Browse files Browse the repository at this point in the history
* CI: Testing for latest Sphinx (8.0)

* CI: Fix helper class version checking.
  • Loading branch information
joeced authored and apozharski committed Aug 15, 2024
1 parent 51a6234 commit 0e5ccba
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
34 changes: 28 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
tox -e "${{matrix.python-version}}-sphinx45-pygments${{matrix.pygments-version}}"
test-sphinx-newer:
test-sphinx-5-7:
name: Run tests for Python ${{ matrix.python-version }}, Sphinx ${{ matrix.sphinx-version }}, Pygments ${{ matrix.pygments-version }}
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
sphinx-version: ["53", "60", "latest"]
sphinx-version: ["53", "60", "70"]
pygments-version: ["213", "latest"]
steps:
- uses: actions/checkout@v3
Expand All @@ -53,6 +53,28 @@ jobs:
pip install tox==4.8.0
tox -e "${{matrix.python-version}}-sphinx${{matrix.sphinx-version}}-pygments${{matrix.pygments-version}}"
test-sphinx-latest:
name: Run tests for Python ${{ matrix.python-version }}, Sphinx ${{ matrix.sphinx-version }}, Pygments ${{ matrix.pygments-version }}
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
sphinx-version: ["dev"]
pygments-version: ["latest"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Run with Tox
run: |
pip install tox==4.8.0
tox -e "${{matrix.python-version}}-sphinx${{matrix.sphinx-version}}-pygments${{matrix.pygments-version}}"
check:
name: Run static analysis
timeout-minutes: 5
Expand Down Expand Up @@ -80,11 +102,11 @@ jobs:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.11
- name: Build a binary wheel and a source tarball
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 5 additions & 1 deletion tests/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
from sphinx import version_info as sphinx_version_info
import os.path

if sphinx_version_info[0] >= 7 and sphinx_version_info[1] >= 2:
isVersion72OrNewer = (
sphinx_version_info[0] >= 7 and sphinx_version_info[1] >= 2
) or sphinx_version_info[0] >= 8

if isVersion72OrNewer:
# from sphinx.testing.path was deprecated in version 7.2
# https://www.sphinx-doc.org/en/master/extdev/deprecated.html
from pathlib import Path
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ deps =
sphinx45: sphinxcontrib-qthelp==1.0.3
sphinx53: Sphinx>=5.3,<5.4
sphinx60: Sphinx>=6.0,<6.1
sphinx70: Sphinx>=7.0,<8.0
sphinxlatest: Sphinx
sphinxdev: https://github.com/sphinx-doc/sphinx/archive/refs/heads/master.zip
pygments213: Pygments>=2.0.1,<2.14.0
Expand Down

0 comments on commit 0e5ccba

Please sign in to comment.