| 1 |
[tox] |
| 2 |
envlist= |
| 3 |
lint |
| 4 |
mypy |
| 5 |
docs |
| 6 |
covclean |
| 7 |
py{39,310,311,312,313,314},pypy |
| 8 |
covcombine |
| 9 |
covreport |
| 10 |
labels = |
| 11 |
ci = py,covcombine,covreport |
| 12 |
|
| 13 |
[testenv] |
| 14 |
passenv = CI |
| 15 |
extras = dev |
| 16 |
deps = |
| 17 |
coverage |
| 18 |
py{39,310}-toml: tomli |
| 19 |
setenv = PYTHONPATH={toxinidir} |
| 20 |
commands = |
| 21 |
!mp: coverage run nose2 -v --pretty-assert {posargs} |
| 22 |
mp: coverage run nose2 -v --plugin nose2.plugins.mp -N 0 {posargs} |
| 23 |
|
| 24 |
depends = |
| 25 |
py{,py,39,310,311,312,313,314}{,-mp,-toml}: covclean |
| 26 |
covcombine: py{,py,39,310,311,312,313,314}{,-mp,-toml} |
| 27 |
covreport: covcombine |
| 28 |
|
| 29 |
[testenv:covclean] |
| 30 |
deps = coverage |
| 31 |
skip_install = true |
| 32 |
commands = coverage erase |
| 33 |
|
| 34 |
[testenv:covcombine] |
| 35 |
deps = coverage |
| 36 |
skip_install = true |
| 37 |
commands = coverage combine |
| 38 |
|
| 39 |
[testenv:covreport] |
| 40 |
deps = coverage |
| 41 |
skip_install = true |
| 42 |
commands_pre = coverage html --fail-under=0 |
| 43 |
commands = coverage report |
| 44 |
|
| 45 |
[testenv:lint] |
| 46 |
deps = pre-commit~=4.4.0 |
| 47 |
skip_install = true |
| 48 |
commands = pre-commit run --all-files |
| 49 |
|
| 50 |
[testenv:mypy] |
| 51 |
extras = dev |
| 52 |
deps = |
| 53 |
mypy==1.10.0 |
| 54 |
types-setuptools |
| 55 |
types-docutils |
| 56 |
tomli |
| 57 |
coverage |
| 58 |
commands = |
| 59 |
mypy nose2/ {posargs} |
| 60 |
|
| 61 |
[testenv:docs] |
| 62 |
extras = dev |
| 63 |
changedir = docs |
| 64 |
commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html |
| 65 |
|
| 66 |
[testenv:build] |
| 67 |
deps = |
| 68 |
build |
| 69 |
twine |
| 70 |
skip_install = true |
| 71 |
allowlist_externals = rm |
| 72 |
commands_pre = rm -rf dist/ |
| 73 |
commands = |
| 74 |
python -m build |
| 75 |
twine check dist/* |
| 76 |
|
| 77 |
[testenv:publish] |
| 78 |
deps = twine |
| 79 |
skip_install = true |
| 80 |
commands = twine upload dist/* |