diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 05530a0..4587194 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/tox.ini b/tox.ini index d7cb9fc..9de99dc 100644 --- a/tox.ini +++ b/tox.ini @@ -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