summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2022-06-09 11:28:37 -0700
committerGitHub <noreply@github.com>2022-06-09 11:28:37 -0700
commita4dd1220a294ac0710767c28285848591f0dc251 (patch)
treefb3c9154a6a14a26f73fae07e012b884058349e2
parenta134280c755853ae04fdc7f7cf807a340c18ef91 (diff)
downloadnumpydoc-a4dd1220a294ac0710767c28285848591f0dc251.tar.gz
Fix CI (#410)
* Fix CI * Use old docutils
-rw-r--r--.github/workflows/test.yml67
1 files changed, 64 insertions, 3 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 39c61a5..aedd7d2 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -12,8 +12,16 @@ jobs:
strategy:
matrix:
os: [Ubuntu]
- python-version: ["3.7", "3.8", "3.9", "3.10"]
- sphinx-version: ["sphinx==3.0", "sphinx==4.0", "sphinx>4.4"]
+ python-version: ["3.7", "3.8", "3.9"]
+ sphinx-version:
+ [
+ "sphinx==3.0",
+ "sphinx==3.5",
+ "sphinx==4.0",
+ "sphinx==4.5",
+ "sphinx==5.0",
+ "sphinx>=5.0",
+ ]
steps:
- uses: actions/checkout@v3
@@ -32,7 +40,7 @@ jobs:
- name: Downgrade Jinja2 for sphinx<4
if: ${{ matrix.sphinx-version }} == 'sphinx<4.0.2'
- run: python -m pip install jinja2==3.0.3 markupsafe==2.0.1 pydata-sphinx-theme==0.8.0
+ run: python -m pip install jinja2==3.0.3 markupsafe==2.0.1 pydata-sphinx-theme==0.8.0 docutils==0.17.1
- name: Install
run: |
@@ -64,6 +72,59 @@ jobs:
make -C doc html SPHINXOPTS="-nT"
make -C doc latexpdf SPHINXOPTS="-nT"
+ test-new:
+ runs-on: ${{ matrix.os }}-latest
+ strategy:
+ matrix:
+ os: [Ubuntu]
+ python-version: ["3.10"]
+ sphinx-version:
+ ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0"]
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Python setup
+ uses: actions/setup-python@v3
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Setup environment
+ run: |
+ python -m pip install --upgrade pip wheel setuptools
+ python -m pip install -r requirements/test.txt -r doc/requirements.txt
+ python -m pip install codecov
+ python -m pip install ${{ matrix.sphinx-version }}
+ python -m pip list
+
+ - name: Install
+ run: |
+ python -m pip install .
+ pip list
+
+ - name: Run test suite
+ run: |
+ pytest -v --pyargs .
+
+ - name: Test coverage
+ run: |
+ codecov
+
+ - name: Make sure CLI works
+ run: |
+ python -m numpydoc numpydoc.tests.test_main._capture_stdout
+ echo '! python -m numpydoc numpydoc.tests.test_main._invalid_docstring' | bash
+ python -m numpydoc --validate numpydoc.tests.test_main._capture_stdout
+ echo '! python -m numpydoc --validate numpydoc.tests.test_main._docstring_with_errors' | bash
+
+ - name: Setup for doc build
+ run: |
+ sudo apt-get update
+ sudo apt install texlive texlive-latex-extra latexmk dvipng
+
+ - name: Build documentation
+ run: |
+ make -C doc html SPHINXOPTS="-nT"
+ make -C doc latexpdf SPHINXOPTS="-nT"
base:
runs-on: ${{ matrix.os }}-latest
strategy: