From 27dff5175ff3e93dc6f635547bb0ebd13a6ad428 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Fri, 14 Nov 2025 15:09:31 -0800 Subject: [PATCH 1/4] CI: Make tests of sphinx minver more specific. * Simplify sphinx versions to test only the latest released patch for the v6 and v7 series. * Limit the Python versions to only those that have wheels for the old sphinx versions * Move windows test to a dedicated job. --- .github/workflows/test.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64b6cd61..f738864c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,18 +11,13 @@ on: branches: [main] jobs: - test: + test-oldsphinx: runs-on: ${{ matrix.os }}-latest strategy: matrix: os: [Ubuntu] - python-version: ["3.10", "3.11", "3.12", "3.13"] - sphinx-version: - ["sphinx==6.0", "sphinx==6.2", "sphinx==7.0", "sphinx>=7.3"] - include: - - os: Windows - python-version: "3.12" - sphinx-version: "sphinx" # version shouldn't really matter here + python-version: ["3.10", "3.11"] + sphinx-version: ["sphinx<7", "sphinx<8"] defaults: run: shell: bash -eo pipefail {0} @@ -65,7 +60,6 @@ jobs: run: | sudo apt-get update sudo apt install texlive texlive-latex-extra latexmk dvipng - if: runner.os == 'Linux' - name: Build documentation run: | From 654f651080465a26d38dccfc7cd35d9af13952a0 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Fri, 14 Nov 2025 15:11:40 -0800 Subject: [PATCH 2/4] CI: Add testing job for stable sphinx. * Run numpydoc test suite on all platforms with latest released sphinx --- .github/workflows/test.yml | 46 +++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f738864c..a985c16a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,7 +65,51 @@ jobs: run: | make -C doc html SPHINXOPTS="-nT" make -C doc latexpdf SPHINXOPTS="-nT" - if: runner.os == 'Linux' + + test: + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: ["ubuntu", "macos", "windows"] + python-version: ["3.12", "3.13", "3.14"] + steps: + - uses: actions/checkout@v5 + + - name: Python setup + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup environment + run: | + python -m pip install --upgrade pip wheel setuptools + python -m pip list + + - name: Install + run: | + python -m pip install . --group test --group doc + pip list + + - name: Run test suite + run: | + pytest -v --pyargs numpydoc + + - name: Make sure CLI works + run: | + numpydoc render numpydoc.tests.test_main._capture_stdout + echo '! numpydoc render numpydoc.tests.test_main._invalid_docstring' | bash + numpydoc validate numpydoc.tests.test_main._capture_stdout + echo '! numpydoc validate numpydoc.tests.test_main._docstring_with_errors' | bash + + - name: Setup for doc build + run: | + sudo apt update + sudo apt install -y texlive texlive-latex-extra latexmk dvipng + + - name: Build documentation + run: | + make -C doc html SPHINXOPTS="-nT" + make -C doc latexpdf SPHINXOPTS="-nT" prerelease: runs-on: ${{ matrix.os }}-latest From ab0e71c656cb8f3266883a88b65c39987da39567 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Fri, 14 Nov 2025 15:12:15 -0800 Subject: [PATCH 3/4] CI: Split coverage into dedicated job. --- .github/workflows/test.yml | 41 ++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a985c16a..2f3de7ac 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,6 @@ jobs: - name: Setup environment run: | python -m pip install --upgrade pip wheel setuptools - python -m pip install codecov python -m pip install "${{ matrix.sphinx-version }}" python -m pip list @@ -45,10 +44,6 @@ jobs: run: | pytest -v --pyargs numpydoc - - name: Test coverage - run: | - codecov - - name: Make sure CLI works run: | numpydoc render numpydoc.tests.test_main._capture_stdout @@ -116,7 +111,7 @@ jobs: strategy: matrix: os: [ubuntu] - python-version: ["3.11", "3.12", "3.13", "3.14"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v5 @@ -128,7 +123,6 @@ jobs: - name: Setup environment run: | python -m pip install --upgrade pip wheel setuptools - python -m pip install codecov python -m pip list - name: Install @@ -140,10 +134,6 @@ jobs: run: | pytest -v --pyargs . - - name: Test coverage - run: | - codecov - - name: Make sure CLI works run: | numpydoc render numpydoc.tests.test_main._capture_stdout @@ -160,3 +150,32 @@ jobs: run: | make -C doc html SPHINXOPTS="-nT" make -C doc latexpdf SPHINXOPTS="-nT" + + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Python setup + uses: actions/setup-python@v6 + with: + python-version: "3.13" + + - name: Setup environment + run: | + python -m pip install --upgrade pip wheel setuptools + python -m pip install codecov + python -m pip list + + - name: Install + run: | + python -m pip install --pre . --group test --group doc + pip list + + - name: Run test suite + run: | + pytest -v --pyargs numpydoc + + - name: Test coverage + run: | + codecov From bcd6018afafdf39d6cbcfe7eddf3db56156159c2 Mon Sep 17 00:00:00 2001 From: Ross Barnowski Date: Fri, 14 Nov 2025 15:14:08 -0800 Subject: [PATCH 4/4] CI: Only run doc builds and CLI tests on linux. --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2f3de7ac..aa8e4ef0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -90,6 +90,7 @@ jobs: pytest -v --pyargs numpydoc - name: Make sure CLI works + if: runner.os == 'Linux' run: | numpydoc render numpydoc.tests.test_main._capture_stdout echo '! numpydoc render numpydoc.tests.test_main._invalid_docstring' | bash @@ -97,11 +98,13 @@ jobs: echo '! numpydoc validate numpydoc.tests.test_main._docstring_with_errors' | bash - name: Setup for doc build + if: runner.os == 'Linux' run: | sudo apt update sudo apt install -y texlive texlive-latex-extra latexmk dvipng - name: Build documentation + if: runner.os == 'Linux' run: | make -C doc html SPHINXOPTS="-nT" make -C doc latexpdf SPHINXOPTS="-nT"