tox: Add environment to build documentation
Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>merge-requests/414/head
parent
ada835d85d
commit
456767786b
|
@ -5,7 +5,6 @@ variables:
|
||||||
GITLAB_CI_IMAGE_PYTHON: 'python:3'
|
GITLAB_CI_IMAGE_PYTHON: 'python:3'
|
||||||
GITLAB_CI_PYPI_DOCKER_COMPOSE: 'docker-compose~=1.23.0'
|
GITLAB_CI_PYPI_DOCKER_COMPOSE: 'docker-compose~=1.23.0'
|
||||||
GITLAB_CI_PYPI_TOX: 'tox~=3.8.0'
|
GITLAB_CI_PYPI_TOX: 'tox~=3.8.0'
|
||||||
GITLAB_CI_PYPI_SPHINX_RTD_THEME: 'sphinx_rtd_theme~=0.4.0'
|
|
||||||
stages:
|
stages:
|
||||||
- static
|
- static
|
||||||
- build
|
- build
|
||||||
|
@ -34,10 +33,10 @@ docs:
|
||||||
stage: build
|
stage: build
|
||||||
image: ${GITLAB_CI_IMAGE_PYTHON}
|
image: ${GITLAB_CI_IMAGE_PYTHON}
|
||||||
before_script:
|
before_script:
|
||||||
- pip install "$GITLAB_CI_PYPI_SPHINX_RTD_THEME"
|
- pip install "$GITLAB_CI_PYPI_TOX"
|
||||||
script:
|
script:
|
||||||
- cd docs
|
- rm -rf docs/_build
|
||||||
- make html SPHINXOPTS="-W"
|
- tox -e "docs"
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
when: always
|
when: always
|
||||||
|
|
20
tox.ini
20
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = flake8,isort,yapf,pylint,build
|
envlist = flake8,isort,yapf,pylint,build,docs
|
||||||
|
|
||||||
[depversions]
|
[depversions]
|
||||||
flake8 = 3.7.7
|
flake8 = 3.7.7
|
||||||
|
@ -7,6 +7,7 @@ isort = 4.3.17
|
||||||
yapf = 0.27.0
|
yapf = 0.27.0
|
||||||
pylint = 2.3.1
|
pylint = 2.3.1
|
||||||
pylint_django = 2.0.9
|
pylint_django = 2.0.9
|
||||||
|
sphinx_rtd_theme = 0.4.3
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps =
|
deps =
|
||||||
|
@ -36,11 +37,6 @@ deps =
|
||||||
skip_install = True
|
skip_install = True
|
||||||
commands = yapf -i -r .
|
commands = yapf -i -r .
|
||||||
|
|
||||||
[testenv:build]
|
|
||||||
skip_install = True
|
|
||||||
commands =
|
|
||||||
python setup.py sdist bdist_wheel
|
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
deps =
|
deps =
|
||||||
pylint=={[depversions]pylint}
|
pylint=={[depversions]pylint}
|
||||||
|
@ -50,6 +46,18 @@ commands = pylint \
|
||||||
{envsitepackagesdir}/db \
|
{envsitepackagesdir}/db \
|
||||||
{envsitepackagesdir}/auth0login
|
{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]
|
[testenv:deps]
|
||||||
install_command = python -m pip install --no-deps {opts} {packages}
|
install_command = python -m pip install --no-deps {opts} {packages}
|
||||||
recreate = True
|
recreate = True
|
||||||
|
|
Loading…
Reference in New Issue