1
1
name : numpydoc tests
2
2
3
+ concurrency :
4
+ group : ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
5
+ cancel-in-progress : true
6
+
3
7
on :
4
8
push :
5
9
branches : [main]
@@ -12,117 +16,86 @@ jobs:
12
16
strategy :
13
17
matrix :
14
18
os : [Ubuntu]
15
- python-version : ["3.7 ", "3.8 ", "3.9 ", "3.10 "]
19
+ python-version : ["3.9 ", "3.10 ", "3.11 ", "3.12", "3.13 "]
16
20
sphinx-version :
17
- ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0"]
21
+ ["sphinx==6.0", "sphinx==6.2", "sphinx==7.0", "sphinx>=7.3"]
22
+ include :
23
+ - os : Windows
24
+ python-version : " 3.12"
25
+ sphinx-version : " sphinx" # version shouldn't really matter here
26
+ defaults :
27
+ run :
28
+ shell : bash -eo pipefail {0}
18
29
steps :
19
- - uses : actions/checkout@v3
30
+ - uses : actions/checkout@v4
20
31
21
32
- name : Python setup
22
- uses : actions/setup-python@v4
33
+ uses : actions/setup-python@v5
23
34
with :
24
35
python-version : ${{ matrix.python-version }}
25
36
26
37
- name : Setup environment
27
38
run : |
28
39
python -m pip install --upgrade pip wheel setuptools
29
- python -m pip install -r requirements/test.txt -r doc/requirements.txt
30
40
python -m pip install codecov
31
41
python -m pip install ${{ matrix.sphinx-version }}
32
42
python -m pip list
33
43
34
44
- name : Install
35
45
run : |
36
- python -m pip install .
46
+ python -m pip install .[test,doc]
37
47
pip list
38
48
39
49
- name : Run test suite
40
50
run : |
41
- pytest -v --pyargs .
51
+ pytest -v --pyargs numpydoc
42
52
43
53
- name : Test coverage
44
54
run : |
45
55
codecov
46
56
47
57
- name : Make sure CLI works
48
58
run : |
49
- python -m numpydoc numpydoc.tests.test_main._capture_stdout
50
- echo '! python -m numpydoc numpydoc.tests.test_main._invalid_docstring' | bash
51
- python -m numpydoc -- validate numpydoc.tests.test_main._capture_stdout
52
- echo '! python -m numpydoc -- validate numpydoc.tests.test_main._docstring_with_errors' | bash
59
+ numpydoc render numpydoc.tests.test_main._capture_stdout
60
+ echo '! numpydoc render numpydoc.tests.test_main._invalid_docstring' | bash
61
+ numpydoc validate numpydoc.tests.test_main._capture_stdout
62
+ echo '! numpydoc validate numpydoc.tests.test_main._docstring_with_errors' | bash
53
63
54
64
- name : Setup for doc build
55
65
run : |
56
66
sudo apt-get update
57
67
sudo apt install texlive texlive-latex-extra latexmk dvipng
68
+ if : runner.os == 'Linux'
58
69
59
70
- name : Build documentation
60
71
run : |
61
72
make -C doc html SPHINXOPTS="-nT"
62
73
make -C doc latexpdf SPHINXOPTS="-nT"
63
-
64
- base :
65
- runs-on : ${{ matrix.os }}-latest
66
- strategy :
67
- matrix :
68
- os : [ubuntu, macos, windows]
69
- python-version : ["3.11-dev"]
70
- sphinx-version :
71
- ["sphinx==4.2", "sphinx==4.5", "sphinx==5.0", "sphinx>=5.0"]
72
- steps :
73
- - uses : actions/checkout@v3
74
-
75
- - name : Python setup
76
- uses : actions/setup-python@v4
77
- with :
78
- python-version : ${{ matrix.python-version }}
79
-
80
- - name : Setup environment
81
- run : |
82
- python -m pip install --upgrade pip wheel setuptools
83
- python -m pip install pytest pytest-cov
84
- python -m pip install ${{ matrix.sphinx-version }}
85
- python -m pip list
86
-
87
- - name : Install
88
- run : |
89
- python -m pip install .
90
- pip list
91
-
92
- - name : Run test suite
93
- run : pytest -v --pyargs numpydoc
94
-
95
- - name : Make sure CLI works
96
- run : |
97
- python -m numpydoc numpydoc.tests.test_main._capture_stdout
98
- echo '! python -m numpydoc numpydoc.tests.test_main._invalid_docstring' | bash
99
- python -m numpydoc --validate numpydoc.tests.test_main._capture_stdout
100
- echo '! python -m numpydoc --validate numpydoc.tests.test_main._docstring_with_errors' | bash
74
+ if : runner.os == 'Linux'
101
75
102
76
prerelease :
103
77
runs-on : ${{ matrix.os }}-latest
104
78
strategy :
105
79
matrix :
106
80
os : [ubuntu]
107
- python-version : ["3.9 ", "3.10 "]
81
+ python-version : ["3.11 ", "3.12", "3.13 "]
108
82
steps :
109
- - uses : actions/checkout@v3
83
+ - uses : actions/checkout@v4
110
84
111
85
- name : Python setup
112
- uses : actions/setup-python@v4
86
+ uses : actions/setup-python@v5
113
87
with :
114
88
python-version : ${{ matrix.python-version }}
115
89
116
90
- name : Setup environment
117
91
run : |
118
92
python -m pip install --upgrade pip wheel setuptools
119
- python -m pip install --pre -r requirements/test.txt -r doc/requirements.txt
120
93
python -m pip install codecov
121
94
python -m pip list
122
95
123
96
- name : Install
124
97
run : |
125
- python -m pip install .
98
+ python -m pip install .[test,doc]
126
99
pip list
127
100
128
101
- name : Run test suite
@@ -135,10 +108,10 @@ jobs:
135
108
136
109
- name : Make sure CLI works
137
110
run : |
138
- python -m numpydoc numpydoc.tests.test_main._capture_stdout
139
- echo '! python -m numpydoc numpydoc.tests.test_main._invalid_docstring' | bash
140
- python -m numpydoc -- validate numpydoc.tests.test_main._capture_stdout
141
- echo '! python -m numpydoc -- validate numpydoc.tests.test_main._docstring_with_errors' | bash
111
+ numpydoc render numpydoc.tests.test_main._capture_stdout
112
+ echo '! numpydoc render numpydoc.tests.test_main._invalid_docstring' | bash
113
+ numpydoc validate numpydoc.tests.test_main._capture_stdout
114
+ echo '! numpydoc validate numpydoc.tests.test_main._docstring_with_errors' | bash
142
115
143
116
- name : Setup for doc build
144
117
run : |
0 commit comments