@@ -26,7 +26,10 @@ passenv =
|
26 | 26 | NO_COLOR |
27 | 27 | PWD |
28 | 28 | PY_COLORS |
29 | | -setenv = VIRTUAL_ENV={envdir} |
| 29 | +setenv = |
| 30 | +DOCS_SOURCE = docs |
| 31 | +DOCS_BUILD = build/sphinx/html |
| 32 | +VIRTUAL_ENV={envdir} |
30 | 33 | whitelist_externals = true |
31 | 34 | usedevelop = True |
32 | 35 | install_command = pip install {opts} {packages} -e . |
@@ -99,8 +102,17 @@ per-file-ignores =
|
99 | 102 | gitlab/v4/objects/__init__.py:F401,F403 |
100 | 103 | |
101 | 104 | [testenv:docs] |
| 105 | +description = Builds the docs site. Generated HTML files will be available in '{env:DOCS_BUILD}'. |
102 | 106 | deps = -r{toxinidir}/requirements-docs.txt |
103 | | -commands = sphinx-build -n -W --keep-going -b html docs build/sphinx/html |
| 107 | +commands = sphinx-build -n -W --keep-going -b html {env:DOCS_SOURCE} {env:DOCS_BUILD} |
| 108 | + |
| 109 | +[testenv:docs-serve] |
| 110 | +description = |
| 111 | + Builds and serves the HTML docs site locally. \ |
| 112 | + Use this for verifying updates to docs. \ |
| 113 | + Changes to docs files will be automatically rebuilt and served. |
| 114 | +deps = -r{toxinidir}/requirements-docs.txt |
| 115 | +commands = sphinx-autobuild {env:DOCS_SOURCE} {env:DOCS_BUILD} --open-browser --port 8000 |
104 | 116 | |
105 | 117 | [testenv:cover] |
106 | 118 | commands = |
|