forked from googleapis/google-cloud-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
310 lines (294 loc) · 7.17 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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
[tox]
envlist =
py27,py34,py35,cover,docs,lint
[testing]
deps =
{toxinidir}/core
{toxinidir}/bigtable
{toxinidir}/storage
{toxinidir}/datastore
{toxinidir}/bigquery
{toxinidir}/pubsub
{toxinidir}/logging
{toxinidir}/dns
{toxinidir}/language
{toxinidir}/error_reporting
{toxinidir}/resource_manager
{toxinidir}/monitoring
{toxinidir}/vision
{toxinidir}/translate
{toxinidir}/speech
{toxinidir}/runtimeconfig
mock
pytest
passenv =
CI_*
CIRCLE*
GOOGLE_*
TRAVIS*
localdeps =
pip install --quiet --upgrade \
{toxinidir}/core \
{toxinidir}/bigtable \
{toxinidir}/storage \
{toxinidir}/datastore \
{toxinidir}/bigquery \
{toxinidir}/pubsub \
{toxinidir}/logging \
{toxinidir}/dns \
{toxinidir}/language \
{toxinidir}/error_reporting \
{toxinidir}/resource_manager \
{toxinidir}/monitoring \
{toxinidir}/vision \
{toxinidir}/translate \
{toxinidir}/speech \
{toxinidir}/runtimeconfig
covercmd =
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-config {toxinidir}/.coveragerc \
core/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
bigtable/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
storage/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
datastore/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
bigquery/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
pubsub/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
logging/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
dns/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
language/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
error_reporting/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
resource_manager/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
monitoring/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
vision/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
translate/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
speech/unit_tests
py.test --quiet \
--cov=google.cloud \
--cov=unit_tests \
--cov-append \
--cov-config {toxinidir}/.coveragerc \
runtimeconfig/unit_tests
coverage report --show-missing --fail-under=100
[testenv]
commands =
python {toxinidir}/scripts/run_unit_tests.py {posargs}
deps =
skip_install =
py27: True
py34: True
py35: True
cover: True
lint: True
passenv =
{[testing]passenv}
[testenv:cover]
commands =
python {toxinidir}/scripts/run_unit_tests.py {posargs} --tox-env cover
[testenv:umbrella-cover]
basepython =
python2.7
commands =
{[testing]localdeps}
{[testing]covercmd}
deps =
{[testing]deps}
coverage
pytest-cov
[testenv:coveralls]
basepython = {[testenv:umbrella-cover]basepython}
commands =
{[testing]localdeps}
{[testing]covercmd}
coveralls
ignore_errors = True
deps =
{[testenv:umbrella-cover]deps}
coveralls
passenv =
{[testing]passenv}
COVERALLS_REPO_TOKEN
[testenv:json-docs]
basepython =
python2.7
commands =
{[testing]localdeps}
python -c \
"import shutil; shutil.rmtree('docs/_build/json', ignore_errors=True)"
{toxinidir}/scripts/update_json_docs.sh
deps =
parinx
pdoc
Sphinx
passenv =
TRAVIS_TAG
TRAVIS_BRANCH
TRAVIS_PULL_REQUEST
GH_OAUTH_TOKEN
[testenv:docs]
basepython =
python2.7
commands =
{[testing]localdeps}
python -c \
"import shutil; shutil.rmtree('docs/_build', ignore_errors=True)"
sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html
python {toxinidir}/scripts/verify_included_modules.py --build-root _build
deps =
{[testing]deps}
Sphinx
sphinx_rtd_theme
passenv =
{[testing]passenv}
SPHINX_RELEASE
READTHEDOCS
[testenv:docs-doc2dash]
basepython = {[testenv:docs]basepython}
commands =
{[testing]localdeps}
sphinx-build -W -b html -d docs/_build_doc2dash/doctrees \
docs docs/_build_doc2dash/html
doc2dash -vv --force -n google-cloud-python \
-i docs/_static/images/gcp-logo-32x32.png -I index.html \
-u https://google-cloud-python.readthedocs.io/en/latest/ \
-d docs/_build_doc2dash/ docs/_build_doc2dash/html
deps =
{[testenv:docs]deps}
doc2dash
passenv =
{[testenv:docs]passenv}
[pycodestyle]
exclude =
docs/conf.py,
bigtable/google/cloud/bigtable/_generated/*,
verbose = 1
[testenv:lint]
basepython =
python2.7
commands =
python {toxinidir}/scripts/pycodestyle_on_repo.py
python {toxinidir}/scripts/run_pylint.py
deps =
{[testing]deps}
pycodestyle >= 2.1.0
pylint >= 1.6.4
passenv =
{[testing]passenv}
[testenv:system-tests]
basepython =
python2.7
commands =
{[testing]localdeps}
python {toxinidir}/system_tests/attempt_system_tests.py {posargs}
deps =
{[testing]deps}
Sphinx
passenv =
{[testing]passenv}
encrypted_*
[testenv:system-tests3]
basepython =
python3.5
commands =
{[testenv:system-tests]commands}
deps =
{[testenv:system-tests]deps}
passenv =
{[testenv:system-tests]passenv}
[emulator]
deps =
{[testing]deps}
psutil
setenv =
GOOGLE_CLOUD_NO_PRINT=true
emulatorcmd =
python {toxinidir}/system_tests/run_emulator.py
[testenv:datastore-emulator]
commands =
{[emulator]emulatorcmd} --package=datastore
setenv = {[emulator]setenv}
passenv = {[testing]passenv}
deps = {[emulator]deps}
[testenv:pubsub-emulator]
commands =
{[emulator]emulatorcmd} --package=pubsub
setenv = {[emulator]setenv}
passenv = {[testing]passenv}
deps = {[emulator]deps}
[testenv:bigtable-emulator]
commands =
{[emulator]emulatorcmd} --package=bigtable
setenv = {[emulator]setenv}
passenv = {[testing]passenv}
deps = {[emulator]deps}