This commit is contained in:
Rodney, Tiara 2024-04-07 22:32:31 +02:00
parent b96d554b05
commit 9e39217423
No known key found for this signature in database
GPG key ID: 0E3706E71FED4D7D
35 changed files with 1465 additions and 0 deletions

73
tox.ini Executable file
View file

@ -0,0 +1,73 @@
[tox]
skipsdist = true
maxversion = 3.11.0
isolated_build = True
env_list =
static-type-check
lint
test
[testenv]
basepython = python3
deps =
{toxinidir}
setenv = PYTHONPATH = {toxinidir}/src
[testenv:lint]
description = lint with pylint
deps =
pylint >= 2.12.2, < 3
commands =
python3 -m pylint {toxinidir}/src {posargs}
[testenv:static-type-check]
description = static type checking
deps =
mypy >=1.5.1,<2
commands =
python3 -m mypy {toxinidir}/src {posargs}
[testenv:test]
description = test suite with pytest
deps =
pytest
pytest-cov
commands =
pytest \
--junitxml=test-reports/full.xml \
--cov-report term \
--cov-report html:test-reports/coverage \
--cov=wsgirouter \
{posargs}
[testenv:build-demo]
description = test suite with pytest
deps =
sphinx
{toxinidir}
commands =
sphinx-build -b html -Dhtml4_writer=0 \
-d {envtmpdir}/doctrees demo \
build/demo
[testenv:autobuild-demo]
description = test suite with pytest
deps =
sphinx
sphinx-autobuild
{toxinidir}
commands =
sphinx-autobuild -b html -Dhtml4_writer=0 \
-d {envtmpdir}/doctrees demo \
--watch src/tiararodneycom_theme \
build/demo
[testenv:build-sdist]
description = build and package
deps =
build >= 0.5.1, < 1
commands =
python3 -m build --sdist {posargs}