From 4e50295bf003249c22ce36151932f5d56dc68290 Mon Sep 17 00:00:00 2001 From: Harsha Narayana Date: Sat, 13 Jul 2019 13:00:37 +0530 Subject: [PATCH] fix: #1631: add tox test support for documentation Signed-off-by: Harsha Narayana --- Makefile | 6 ++++++ tox.ini | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 3c0cb975..72e86aab 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,9 @@ help: @echo "clean-docs" @echo " Clean Sanic documentation" @echo "" + @echo "docs-test" + @echo " Test Sanic Documentation for errors" + @echo "" clean: @@ -70,3 +73,6 @@ docs-clean: docs: docs-clean cd docs && make html + +docs-test: docs-clean + cd docs && make dummy diff --git a/tox.ini b/tox.ini index 3ff30ef8..daaeb7e6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py36, py37, {py36,py37}-no-ext, lint, check, security +envlist = py36, py37, {py36,py37}-no-ext, lint, check, security, docs [testenv] usedevelop = True @@ -55,3 +55,14 @@ deps = commands = bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py + +[testenv:docs] +deps = + sphinx>=2.1.2 + sphinx_rtd_theme>=0.4.3 + recommonmark>=0.5.0 + docutils + pygments + +commands = + make docs-test