django-configurations/tox.ini
Brian Helba 93e628e870
Refactor the documentation build process (#311)
* Refactor the documentation build process

Significant improvements:
* Allow easy isolated local builds via a dedicated Tox environment
* Configure Sphinx to use consistent packages and theme across local, CI,
  and ReadTheDocs builds; local builds now look the same as the published
  RTD pages
* Explicitly add a ReadTheDocs configuration as code, per their documented
  best practices
* Remove lots of dead code and simplify the Sphinx configuration file
* Build docs in a dedicated CI step and enable stricter warning checking

* Fix docutils related build error.

* Relax Sphinx version.

* Invalidate RTD build cache.

* No need to combine coverage reporting I think.

* Add combining again.

Co-authored-by: Jannis Leidel <jannis@leidel.info>
2021-11-08 16:49:41 +01:00

67 lines
1.3 KiB
INI

[tox]
skipsdist = true
usedevelop = true
minversion = 1.8
envlist =
py36-checkqa
docs
py{36,37,py36,py37}-dj{22,31,32}
py{38,39,py38}-dj{22,31,32,40,main}
py{310}-dj{32,40,main}
[gh-actions]
python =
3.6: py36,flake8,readme
3.7: py37
3.8: py38
3.9: py39
3.10: py310
pypy-3.6: pypy36
pypy-3.7: pypy37
pypy-3.8: pypy38
[testenv]
usedevelop = true
setenv =
DJANGO_SETTINGS_MODULE = tests.settings.main
DJANGO_CONFIGURATION = Test
COVERAGE_PROCESS_START = {toxinidir}/setup.cfg
deps =
dj22: django~=2.2.17
dj31: django~=3.1.3
dj32: django~=3.2.9
dj40: django>=4.0b1,<4.1
djmain: https://github.com/django/django/archive/main.tar.gz
coverage
coverage_enable_subprocess
extras = testing
commands =
python --version
{envbindir}/coverage run {envbindir}/django-cadmin test -v2 {posargs:tests}
coverage combine . tests docs
coverage report -m --skip-covered
coverage xml
[testenv:py36-checkqa]
commands =
flake8 {toxinidir}
check-manifest -v
python setup.py sdist
twine check dist/*
deps =
flake8
twine
check-manifest
[testenv:docs]
setenv =
deps =
-r docs/requirements.txt
commands =
sphinx-build \
-b html \
-a \
-W \
-n \
docs \
docs/_build/html