Add docs env to tox 78/71578/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 30 Apr 2018 13:23:58 +0000 (09:23 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 30 Apr 2018 13:24:00 +0000 (09:24 -0400)
Add docs and docs-linkcheck environments to build docs via tox.

Also adds missing favicon.ico.

Change-Id: I3b43689d3be952656baf87954adbb02d3f9c8145
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.gitignore
docs/favicon.ico [new file with mode: 0644]
tox.ini

index d4c57ecda76d3c7a1da0066cee24a0ce23061dd8..a508c9ec53994821e22061a77d9179bc6041e342 100644 (file)
@@ -35,3 +35,4 @@ log.txt
 
 # Tox test/linting files
 .tox/
+_build/
diff --git a/docs/favicon.ico b/docs/favicon.ico
new file mode 100644 (file)
index 0000000..c9b3888
Binary files /dev/null and b/docs/favicon.ico differ
diff --git a/tox.ini b/tox.ini
index 66896abc56db853c8af4b0d4b6647580db3bb34d..c9747942660788958157d184db8d508c5cd4731d 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,10 @@
 [tox]
 minversion = 1.6.0
-envlist = pep8,coala
+envlist =
+    coala,
+    docs,
+    docs-linkcheck,
+    pep8
 skipsdist = true
 
 [testenv:coala]
@@ -14,6 +18,17 @@ commands =
     python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
     coala --non-interactive
 
+[testenv:docs]
+deps = -rdocs/requirements.txt
+commands =
+    sphinx-build -W -b html -n -W -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+    echo "Generated docs available in {toxinidir}/docs/_build/html"
+whitelist_externals = echo
+
+[testenv:docs-linkcheck]
+deps = -rdocs/requirements.txt
+commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
 [testenv:pep8]
 deps =
     flake8