File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 36
36
. doc_env/bin/activate
37
37
python3 -m pip install -r doc/requirements.txt
38
38
python3 -m pip install setuptools
39
+ python3 -m pip install pytest
39
40
echo PATH=$PATH >> $GITHUB_ENV
40
41
41
42
- name : Build GDAL
@@ -73,11 +74,19 @@ jobs:
73
74
if find . -name '*.rst' | xargs grep "\.\.warning"; then echo 'Wrong annotation. Should be .. warning'; false; fi
74
75
if find . -name '*.rst' | xargs grep "\.\.codeblock"; then echo 'Wrong annotation. Should be .. codeblock'; false; fi
75
76
working-directory : ./doc
77
+
76
78
- name : Doxygen
77
79
shell : bash -l {0}
78
80
run : |
79
81
cmake --build . --target doxygen_xml
80
82
working-directory : build
83
+
84
+ - name : Test documentation examples
85
+ shell : bash -l {0}
86
+ run : |
87
+ ctest -V -R doc-examples --output-on-failure
88
+ working-directory : build
89
+
81
90
- name : Spelling
82
91
shell : bash -l {0}
83
92
run : |
Original file line number Diff line number Diff line change @@ -204,4 +204,13 @@ if (BUILD_DOCS)
204
204
-D html_extra_path=extra_path
205
205
)
206
206
207
+ add_test (NAME doc -examples
208
+ COMMAND ${CMAKE_COMMAND} -E env ${BUILD_RUN_ENV}
209
+ ${Python_EXECUTABLE} -m pytest -v --doctest-modules
210
+ ${CMAKE_BINARY_DIR} /swig/python/osgeo/gdal.py
211
+ ${CMAKE_BINARY_DIR} /swig/python/osgeo/gdal_array.py
212
+ ${CMAKE_BINARY_DIR} /swig/python/osgeo/ogr.py
213
+ ${CMAKE_BINARY_DIR} /swig/python/osgeo/osr.py
214
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR} )
215
+
207
216
endif ()
You can’t perform that action at this time.
0 commit comments