forked from pypa/twine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
113 lines (102 loc) · 2.4 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
[tox]
minversion = 2.4
envlist = lint,types,py{36,37,38,39},integration,docs
[testenv]
deps =
pretend
pytest
pytest-cov
pytest-socket
passenv =
PYTEST_ADDOPTS
commands =
pytest --ignore-glob '*integration*.py' {posargs:--cov-report term-missing --cov-report html}
[testenv:integration]
deps =
{[testenv]deps}
jaraco.envs
munch
portend
pytest-rerunfailures
pytest-services
passenv =
PYTEST_ADDOPTS
commands =
# Skipping coverage because that should be handled by the other tests
pytest -r aR --no-cov tests/test_integration.py
[testenv:docs]
deps =
-rdocs/requirements.txt
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
doc8 docs README.rst --ignore-path docs/_build/html
sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
python setup.py sdist
twine check dist/*
[testenv:watch-docs]
deps =
-rdocs/requirements.txt
sphinx-autobuild
commands =
sphinx-autobuild -W -b html -d {envtmpdir}/doctrees \
{posargs:--host 127.0.0.1} \
docs docs/_build/html
[testenv:format]
skip_install = True
deps =
isort
black
commands =
isort twine/ tests/
black twine/ tests/
[testenv:lint]
skip_install = True
deps =
{[testenv:format]deps}
flake8
flake8-docstrings
commands =
isort --check-only --diff twine/ tests/
black --check --diff twine/ tests/
flake8 twine/ tests/
[testenv:types]
deps =
mypy
lxml
# required for more thorough type declarations
keyring >= 22.3
commands =
mypy --html-report mypy --txt-report mypy {posargs:twine}
python -c 'with open("mypy/index.txt") as f: print(f.read())'
[testenv:changelog]
basepython = python3
deps =
towncrier
commands =
towncrier {posargs}
[testenv:release]
# disabled for twine to cause it to upload itself
# skip_install = True
# specify Python 3 to use platform's default Python 3
basepython = python3
deps =
pep517>=0.5
twine>=1.13
path.py
passenv =
TWINE_PASSWORD
TWINE_REPOSITORY
setenv =
TWINE_USERNAME = {env:TWINE_USERNAME:__token__}
commands =
python -c "import path; path.Path('dist').rmtree_p()"
python -m pep517.build .
python -m twine upload dist/*
[testenv:devpi]
deps =
devpi-server
devpi
[testenv:pypiserver]
deps =
pypiserver