-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
tox.ini
250 lines (211 loc) · 6.2 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
[tox]
# note that this envlist is the default set of environments that will run if a target environment is not selected.
envlist = whl,sdist
[tools]
deps =
-r ../../../eng/test_tools.txt
[coverage:paths]
source =
azure
**/azure
[base]
deps =
-rdev_requirements.txt
{[tools]deps}
[packaging]
pkgs =
wheel==0.34.2
packaging==20.4
[testenv]
ignore_args=--ignore=.tox --ignore=build --ignore=.eggs
default_pytest_params = --junitxml={toxinidir}/test-junit-{envname}.xml --verbose --durations=10 --ignore=azure {[testenv]ignore_args}
parallel_show_output =True
pre-deps =
{[packaging]pkgs}
skip_install = true
skipsdist = true
usedevelop = false
platform = linux: linux
macos: darwin
windows: win32
passenv = *
setenv =
SPHINX_APIDOC_OPTIONS=members,undoc-members,inherited-members
deps = {[base]deps}
changedir = {toxinidir}
install_command = python -m pip install {opts} {packages} --cache-dir {toxinidir}/../.tox_pip_cache_{envname}
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} -w {envtmpdir}
{envbindir}/python -m pip freeze
pytest \
{[testenv]default_pytest_params} \
{posargs} \
{toxinidir}
[testenv:lint]
skipsdist = false
skip_install = false
usedevelop = true
changedir = {toxinidir}
deps =
{[base]deps}
-e {toxinidir}/../../scripts/pylint_custom_plugin
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/run_pylint.py -t {toxinidir}
[testenv:mypy]
skipsdist = false
skip_install = false
usedevelop = true
changedir = {toxinidir}
deps =
{[base]deps}
mypy==0.782; python_version >= '3.5'
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/run_mypy.py -t {toxinidir}
[testenv:sdist]
skipsdist = true
skip_install = true
changedir = {toxinidir}
deps =
{[base]deps}
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {envtmpdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python -m pip freeze
pytest \
{posargs} \
--no-cov \
{[testenv]ignore_args} \
{toxinidir}
[testenv:develop]
skipsdist = false
skip_install = false
usedevelop = true
changedir = {toxinidir}
deps =
{[base]deps}
commands =
pytest \
{posargs} \
--ignore=.tox \
{toxinidir}
[testenv:sphinx]
skipsdist = false
skip_install = false
changedir = {toxinidir}
passenv = *
deps =
{[base]deps}
sphinx==3.0.4
sphinx_rtd_theme==0.5.0
recommonmark==0.6.0
m2r==0.2.1
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/prep_sphinx_env.py -d {distdir} -t {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/run_sphinx_apidoc.py \
-w {distdir} \
-r {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/run_sphinx_build.py \
-w {distdir}/unzipped/docgen \
-o {distdir}/site \
-r {toxinidir}
[testenv:depends]
pre-deps =
{[packaging]pkgs}
platform = linux: linux
macos: darwin
windows: win32
changedir = {toxinidir}
deps =
{[tools]deps}
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/sanitize_setup.py -t {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {envtmpdir} \
-p {toxinidir} \
-e https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple \
--install-preview true \
-w {envtmpdir} \
--force-create true
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/import_all.py -t {toxinidir}
[testenv:verifywhl]
skipsdist = true
skip_install = true
changedir = {toxinidir}
deps =
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} --skip-install True
{envbindir}/python {toxinidir}/../../../eng/tox/verify_whl.py -d {envtmpdir} -t {toxinidir}
[testenv:verifysdist]
skipsdist = true
skip_install = true
changedir = {toxinidir}
deps =
commands =
{envbindir}/python {toxinidir}/setup.py --q sdist --format zip -d {envtmpdir}
{envbindir}/python {toxinidir}/../../../eng/tox/verify_sdist.py -d {envtmpdir} -t {toxinidir}
[testenv:devtest]
pre-deps =
{[packaging]pkgs}
deps = {[base]deps}
changedir = {toxinidir}
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/install_dev_build_dependency.py -t {toxinidir}
pytest \
{[testenv]default_pytest_params} \
--ignore=.tox \
{posargs} \
{toxinidir}
[deptestcommands]
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/install_depend_packages.py -t {toxinidir} -d {env:DEPENDENCY_TYPE:} -w {envtmpdir}
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} -w {envtmpdir}
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/verify_installed_packages.py --packages-file {envtmpdir}/packages.txt
pytest {[testenv]default_pytest_params} {posargs} --no-cov {toxinidir}
[testenv:latestdependency]
pre-deps =
{[packaging]pkgs}
deps = {[tools]deps}
changedir = {toxinidir}
passenv = *
setenv =
DEPENDENCY_TYPE=Latest
commands =
{[deptestcommands]commands}
[testenv:mindependency]
pre-deps =
{[packaging]pkgs}
deps = {[tools]deps}
changedir = {toxinidir}
passenv = *
setenv =
DEPENDENCY_TYPE=Minimum
commands =
{[deptestcommands]commands}
[testenv:apistub]
skipsdist = false
skip_install = false
usedevelop = false
changedir = {envtmpdir}
deps =
{[base]deps}
commands =
# install API stub generator
{envbindir}/python -m pip install "git+https://github.com/azure/azure-sdk-tools.git#subdirectory=packages/python-packages/api-stub-generator&egg=api-stub-generator"
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/run_apistubgen.py -t {toxinidir} -w {envtmpdir}
[testenv:bandit]
skipsdist = false
skip_install = false
usedevelop = false
changedir = {envtmpdir}
deps =
{[base]deps}
commands =
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/run_bandit.py -t {toxinidir}