/
tox.ini
48 lines (42 loc) · 921 Bytes
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[tox]
envlist=py{38,39,310,311,312}{,-nocov},pypy,docs,lint
[testenv]
passenv = CI
extras = dev
deps = !nocov: coverage
setenv = PYTHONPATH={toxinidir}
commands =
nocov: nose2 -v --pretty-assert {posargs}
!nocov: coverage erase
!nocov: coverage run nose2 -v --pretty-assert {posargs}
!nocov: coverage report
[testenv:lint]
deps = pre-commit~=2.9.3
skip_install = true
commands = pre-commit run --all-files
[testenv:mypy]
extras = dev
deps =
mypy
types-setuptools
types-docutils
commands =
mypy nose2/ {posargs}
[testenv:docs]
extras = dev
changedir = docs
commands = sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:build]
deps =
build
twine
skip_install = true
allowlist_externals = rm
commands_pre = rm -rf dist/
commands =
python -m build
twine check dist/*
[testenv:publish]
deps = twine
skip_install = true
commands = twine upload dist/*