diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b147476a..0404b9a2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -85,18 +85,18 @@ repos: - --disable=MD013 # Infrastructure - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.5.0 + rev: v2.5.1 hooks: - id: pyproject-fmt - name: pyproject.toml formatter - description: "Format the pyproject.toml file." args: - --indent=4 additional_dependencies: - tox==4.24.1 # https://github.com/tox-dev/tox/releases/latest + - repo: https://github.com/tox-dev/tox-ini-fmt + rev: 1.5.0 + hooks: + - id: tox-ini-fmt - repo: https://github.com/abravalheri/validate-pyproject rev: v0.23 hooks: - id: validate-pyproject - name: Validate pyproject.toml - description: "Validate the pyproject.toml file." diff --git a/tox.ini b/tox.ini index d9c30ac2..ffb5638d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,30 +1,33 @@ [tox] -isolated_build = true -skipsdist = true +requires = + tox>=4.2 +env_list = + docs + py{313, 312, 311, 310}-{all, core} +no_package = true usedevelop = true -envlist = py{310,311,312,313}-{all,core}, docs [testenv] -setenv = - all: DJANGO_SETTINGS_MODULE = tests.settings_all - core: DJANGO_SETTINGS_MODULE = tests.settings_core -basepython = +base_python = py310: python3.10 py311: python3.11 py312: python3.12 py313: python3.13 -deps= +deps = coverage -install_command = pip install -e ".[test]" -U {opts} {packages} +set_env = + all: DJANGO_SETTINGS_MODULE = tests.settings_all + core: DJANGO_SETTINGS_MODULE = tests.settings_core commands = all: coverage run runtests.py -v 2 --debug-mode core: coverage run runtests.py allianceauth.authentication.tests.test_app_settings -v 2 --debug-mode all: coverage report -m all: coverage xml +install_command = pip install -e ".[test]" -U {opts} {packages} [testenv:docs] description = invoke sphinx-build to build the HTML docs -basepython = python3.12 -install_command = pip install -e ".[docs]" -U {opts} {packages} +base_python = python3.12 commands = sphinx-build -T -E -b html -d "{toxworkdir}/docs_doctree" -D language=en docs "{toxworkdir}/docs_out" {posargs} +install_command = pip install -e ".[docs]" -U {opts} {packages}