diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dea93d1d..6b8a81ac 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -168,6 +168,12 @@ test-3.11-all: path: coverage.xml allow_failure: true +test-docs: + <<: *only-default + image: python:3.9-bullseye + script: + - tox -e docs + deploy_production: stage: deploy image: python:3.10-bullseye diff --git a/docs/development/dev_setup/aa-dev-setup-wsl-vsc-v2.md b/docs/development/dev_setup/aa-dev-setup-wsl-vsc-v2.md index 4a74d90c..2ae86e90 100644 --- a/docs/development/dev_setup/aa-dev-setup-wsl-vsc-v2.md +++ b/docs/development/dev_setup/aa-dev-setup-wsl-vsc-v2.md @@ -150,12 +150,14 @@ sudo redis-server --daemonize yes ```eval_rst .. note:: - WSL does not have an init.d service, so it will not automatically start your services such as MySQL and Redis when you boot your Windows machine. For convenience we recommend putting the commands for starting these services in a bash script. Here is an example: :: + WSL does not have an init.d service, so it will not automatically start your services such as MySQL and Redis when you boot your Windows machine. For convenience we recommend putting the commands for starting these services in a bash script. Here is an example: - #/bin/bash - # start services for AA dev - sudo service mysql start - sudo redis-server --daemonize yes + :: + + #/bin/bash + # start services for AA dev + sudo service mysql start + sudo redis-server --daemonize yes In addition it is possible to configure Windows to automatically start WSL services, but that procedure goes beyond the scopes of this guide. ``` diff --git a/docs/requirements.txt b/docs/requirements.txt index b187b2e6..8b49539b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,13 +2,15 @@ sphinx>=3.2.1,<4.0.0 sphinx_rtd_theme==0.5.0 recommonmark==0.6.0 +Jinja2<3.1 # Autodoc dependencies django>=3.2,<4.0.0 django-celery-beat>=2.0.0 +django-redis-cache django-bootstrap-form django-sortedm2m -django-esi>=3,<4 +django-esi>=3,<5 celery>5,<6 celery_once passlib diff --git a/tox.ini b/tox.ini index ea70747d..39896d2b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] skipsdist = true usedevelop = true -envlist = py{37,38,39,310,311}-{all,core} +envlist = py{37,38,39,310,311}-{all,core}, docs [testenv] setenv = @@ -21,3 +21,11 @@ commands = core: coverage run runtests.py allianceauth.authentication.tests.test_app_settings -v 2 --debug-mode all: coverage report -m all: coverage xml + +[testenv:docs] +description = invoke sphinx-build to build the HTML docs +basepython = python3.9 +deps = -r{toxinidir}/docs/requirements.txt +install_command = +commands = + sphinx-build -T -E -b html -d "{toxworkdir}/docs_doctree" -D language=en docs "{toxworkdir}/docs_out" {posargs}