mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 04:41:00 +00:00
[mod] CI target test.rst: test reST markup of README.rst
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
f88dec444b
commit
27e3e56800
2 changed files with 15 additions and 3 deletions
6
Makefile
6
Makefile
|
@ -50,8 +50,8 @@ search.checker.%: install
|
||||||
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
|
$(Q)./manage pyenv.cmd searx-checker -v "$(subst _, ,$(patsubst search.checker.%,%,$@))"
|
||||||
|
|
||||||
PHONY += test ci.test test.shell
|
PHONY += test ci.test test.shell
|
||||||
ci.test: test.yamllint test.black test.pylint test.unit test.robot
|
ci.test: test.yamllint test.black test.pylint test.unit test.robot test.rst
|
||||||
test: test.yamllint test.black test.pylint test.unit test.robot test.shell
|
test: test.yamllint test.black test.pylint test.unit test.robot test.rst test.shell
|
||||||
test.shell:
|
test.shell:
|
||||||
$(Q)shellcheck -x -s dash \
|
$(Q)shellcheck -x -s dash \
|
||||||
dockerfiles/docker-entrypoint.sh
|
dockerfiles/docker-entrypoint.sh
|
||||||
|
@ -86,7 +86,7 @@ MANAGE += py.build py.clean
|
||||||
MANAGE += pyenv pyenv.install pyenv.uninstall
|
MANAGE += pyenv pyenv.install pyenv.uninstall
|
||||||
MANAGE += pypi.upload pypi.upload.test
|
MANAGE += pypi.upload pypi.upload.test
|
||||||
MANAGE += format.python
|
MANAGE += format.python
|
||||||
MANAGE += test.yamllint test.pylint test.black test.unit test.coverage test.robot test.clean
|
MANAGE += test.yamllint test.pylint test.black test.unit test.coverage test.robot test.rst test.clean
|
||||||
MANAGE += themes.all themes.oscar themes.simple themes.simple.test pygments.less
|
MANAGE += themes.all themes.oscar themes.simple themes.simple.test pygments.less
|
||||||
MANAGE += static.build.commit static.build.drop static.build.restore
|
MANAGE += static.build.commit static.build.drop static.build.restore
|
||||||
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
|
MANAGE += nvm.install nvm.clean nvm.status nvm.nodejs
|
||||||
|
|
12
manage
12
manage
|
@ -46,6 +46,10 @@ while IFS= read -r line; do
|
||||||
YAMLLINT_FILES+=("$line")
|
YAMLLINT_FILES+=("$line")
|
||||||
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searxng/*.yml')"
|
done <<< "$(git ls-files './tests/*.yml' './searx/*.yml' './utils/templates/etc/searxng/*.yml')"
|
||||||
|
|
||||||
|
RST_FILES=(
|
||||||
|
'README.rst'
|
||||||
|
)
|
||||||
|
|
||||||
PYLINT_SEARXNG_DISABLE_OPTION="\
|
PYLINT_SEARXNG_DISABLE_OPTION="\
|
||||||
I,C,R,\
|
I,C,R,\
|
||||||
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
|
W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
|
||||||
|
@ -103,6 +107,7 @@ test.:
|
||||||
unit : run unit tests
|
unit : run unit tests
|
||||||
coverage : run unit tests with coverage
|
coverage : run unit tests with coverage
|
||||||
robot : run robot test
|
robot : run robot test
|
||||||
|
rst : test .rst files incl. README.rst
|
||||||
clean : clean intermediate test stuff
|
clean : clean intermediate test stuff
|
||||||
themes.:
|
themes.:
|
||||||
all : build all themes
|
all : build all themes
|
||||||
|
@ -707,6 +712,13 @@ test.robot() {
|
||||||
dump_return $?
|
dump_return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test.rst() {
|
||||||
|
build_msg TEST "[reST markup] ${RST_FILES[@]}"
|
||||||
|
for rst in "${RST_FILES[@]}"; do
|
||||||
|
pyenv.cmd rst2html.py --halt error "$rst" > /dev/null || die 42 "fix issue in $rst"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
test.clean() {
|
test.clean() {
|
||||||
build_msg CLEAN "test stuff"
|
build_msg CLEAN "test stuff"
|
||||||
rm -rf geckodriver.log .coverage coverage/
|
rm -rf geckodriver.log .coverage coverage/
|
||||||
|
|
Loading…
Reference in a new issue