Skip to content

Commit a4dd122

Browse files
Fix CI (#410)
* Fix CI * Use old docutils
1 parent a134280 commit a4dd122

File tree

1 file changed

+64
-3
lines changed

1 file changed

+64
-3
lines changed

.github/workflows/test.yml

+64-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [Ubuntu]
15-
python-version: ["3.7", "3.8", "3.9", "3.10"]
16-
sphinx-version: ["sphinx==3.0", "sphinx==4.0", "sphinx>4.4"]
15+
python-version: ["3.7", "3.8", "3.9"]
16+
sphinx-version:
17+
[
18+
"sphinx==3.0",
19+
"sphinx==3.5",
20+
"sphinx==4.0",
21+
"sphinx==4.5",
22+
"sphinx==5.0",
23+
"sphinx>=5.0",
24+
]
1725
steps:
1826
- uses: actions/checkout@v3
1927

@@ -32,7 +40,7 @@ jobs:
3240
3341
- name: Downgrade Jinja2 for sphinx<4
3442
if: ${{ matrix.sphinx-version }} == 'sphinx<4.0.2'
35-
run: python -m pip install jinja2==3.0.3 markupsafe==2.0.1 pydata-sphinx-theme==0.8.0
43+
run: python -m pip install jinja2==3.0.3 markupsafe==2.0.1 pydata-sphinx-theme==0.8.0 docutils==0.17.1
3644

3745
- name: Install
3846
run: |
@@ -64,6 +72,59 @@ jobs:
6472
make -C doc html SPHINXOPTS="-nT"
6573
make -C doc latexpdf SPHINXOPTS="-nT"
6674
75+
test-new:
76+
runs-on: ${{ matrix.os }}-latest
77+
strategy:
78+
matrix:
79+
os: [Ubuntu]
80+
python-version: ["3.10"]
81+
sphinx-version:
82+
["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0"]
83+
steps:
84+
- uses: actions/checkout@v3
85+
86+
- name: Python setup
87+
uses: actions/setup-python@v3
88+
with:
89+
python-version: ${{ matrix.python-version }}
90+
91+
- name: Setup environment
92+
run: |
93+
python -m pip install --upgrade pip wheel setuptools
94+
python -m pip install -r requirements/test.txt -r doc/requirements.txt
95+
python -m pip install codecov
96+
python -m pip install ${{ matrix.sphinx-version }}
97+
python -m pip list
98+
99+
- name: Install
100+
run: |
101+
python -m pip install .
102+
pip list
103+
104+
- name: Run test suite
105+
run: |
106+
pytest -v --pyargs .
107+
108+
- name: Test coverage
109+
run: |
110+
codecov
111+
112+
- name: Make sure CLI works
113+
run: |
114+
python -m numpydoc numpydoc.tests.test_main._capture_stdout
115+
echo '! python -m numpydoc numpydoc.tests.test_main._invalid_docstring' | bash
116+
python -m numpydoc --validate numpydoc.tests.test_main._capture_stdout
117+
echo '! python -m numpydoc --validate numpydoc.tests.test_main._docstring_with_errors' | bash
118+
119+
- name: Setup for doc build
120+
run: |
121+
sudo apt-get update
122+
sudo apt install texlive texlive-latex-extra latexmk dvipng
123+
124+
- name: Build documentation
125+
run: |
126+
make -C doc html SPHINXOPTS="-nT"
127+
make -C doc latexpdf SPHINXOPTS="-nT"
67128
base:
68129
runs-on: ${{ matrix.os }}-latest
69130
strategy:

0 commit comments

Comments
 (0)