1
0
Fork 0

tox: Add environment to build documentation

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>
merge-requests/414/head
Vasilis Tsiligiannis 2019-09-20 18:00:31 +03:00
parent ada835d85d
commit 456767786b
2 changed files with 17 additions and 10 deletions

View File

@ -5,7 +5,6 @@ variables:
GITLAB_CI_IMAGE_PYTHON: 'python:3'
GITLAB_CI_PYPI_DOCKER_COMPOSE: 'docker-compose~=1.23.0'
GITLAB_CI_PYPI_TOX: 'tox~=3.8.0'
GITLAB_CI_PYPI_SPHINX_RTD_THEME: 'sphinx_rtd_theme~=0.4.0'
stages:
- static
- build
@ -34,10 +33,10 @@ docs:
stage: build
image: ${GITLAB_CI_IMAGE_PYTHON}
before_script:
- pip install "$GITLAB_CI_PYPI_SPHINX_RTD_THEME"
- pip install "$GITLAB_CI_PYPI_TOX"
script:
- cd docs
- make html SPHINXOPTS="-W"
- rm -rf docs/_build
- tox -e "docs"
artifacts:
expire_in: 1 week
when: always

20
tox.ini
View File

@ -1,5 +1,5 @@
[tox]
envlist = flake8,isort,yapf,pylint,build
envlist = flake8,isort,yapf,pylint,build,docs
[depversions]
flake8 = 3.7.7
@ -7,6 +7,7 @@ isort = 4.3.17
yapf = 0.27.0
pylint = 2.3.1
pylint_django = 2.0.9
sphinx_rtd_theme = 0.4.3
[testenv:flake8]
deps =
@ -36,11 +37,6 @@ deps =
skip_install = True
commands = yapf -i -r .
[testenv:build]
skip_install = True
commands =
python setup.py sdist bdist_wheel
[testenv:pylint]
deps =
pylint=={[depversions]pylint}
@ -50,6 +46,18 @@ commands = pylint \
{envsitepackagesdir}/db \
{envsitepackagesdir}/auth0login
[testenv:build]
skip_install = True
commands =
python setup.py sdist bdist_wheel
[testenv:docs]
deps =
sphinx_rtd_theme=={[depversions]sphinx_rtd_theme}
changedir = {toxinidir}/docs
commands =
sphinx-build -b html . "_build/html"
[testenv:deps]
install_command = python -m pip install --no-deps {opts} {packages}
recreate = True