blob: cc5ea58518ae1f378feab3f0fe1905321989eb40 [file] [log] [blame]
James E. Blair1e8dd892012-05-30 09:15:05 -07001[tox]
zhaoxinyu363e5642013-09-18 16:05:24 -07002minversion = 1.6
Monty Taylor5f2feaf2013-09-19 07:47:01 -07003skipsdist = True
Monty Taylor777c58a2017-06-16 10:26:45 -05004envlist = pep8,py35
James E. Blairb0fcae42012-07-17 11:12:10 -07005
6[testenv]
Monty Taylor777c58a2017-06-16 10:26:45 -05007basepython = python3
James E. Blairf62d4282012-12-31 17:01:50 -08008# Set STATSD env variables so that statsd code paths are tested.
Ian Wienandff977bf2015-09-30 15:38:47 +10009setenv = STATSD_HOST=127.0.0.1
James E. Blairf62d4282012-12-31 17:01:50 -080010 STATSD_PORT=8125
Monty Taylorbc758832013-06-17 17:22:42 -040011 VIRTUAL_ENV={envdir}
James E. Blair267e5162017-04-07 10:08:20 -070012 OS_TEST_TIMEOUT=120
James E. Blair1c236df2017-02-01 14:07:24 -080013passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_LOG_DEFAULTS
Monty Taylor5f2feaf2013-09-19 07:47:01 -070014usedevelop = True
zhaoxinyu363e5642013-09-18 16:05:24 -070015install_command = pip install {opts} {packages}
Monty Taylor49983152013-06-02 08:42:01 -040016deps = -r{toxinidir}/requirements.txt
17 -r{toxinidir}/test-requirements.txt
Monty Taylorbc758832013-06-17 17:22:42 -040018commands =
Clark Boylan3b6bb102017-04-07 17:37:06 -070019 python setup.py test --slowest --testr-args='{posargs}'
James E. Blair1e8dd892012-05-30 09:15:05 -070020
Paul Belangere23f5992016-06-03 23:44:15 -040021[testenv:bindep]
22# Do not install any requirements. We want this to be fast and work even if
23# system dependencies are missing, since it's used to tell you what system
24# dependencies are missing! This also means that bindep must be installed
25# separately, outside of the requirements files.
26deps = bindep
27commands = bindep test
28
James E. Blair1e8dd892012-05-30 09:15:05 -070029[testenv:pep8]
Monty Taylorfb8f5a42017-07-27 12:41:34 -050030# --ignore-missing-imports tells mypy to not try to follow imported modules
31# out of the current tree. As you might expect, we don't want to run static
32# type checking on the world - just on ourselves.
33commands =
34 flake8 {posargs}
35 mypy --ignore-missing-imports zuul
James E. Blaircdd00072012-06-08 19:17:28 -070036
37[testenv:cover]
Monty Taylorbc758832013-06-17 17:22:42 -040038commands =
Clark Boylan3b6bb102017-04-07 17:37:06 -070039 python setup.py test --coverage
James E. Blairff986a12012-05-30 14:56:51 -070040
Monty Taylorffd90ea2014-09-08 13:47:38 -070041[testenv:docs]
Antoine Mussod70f3d82014-01-10 16:36:44 +010042commands = python setup.py build_sphinx
43
James E. Blaircdd00072012-06-08 19:17:28 -070044[testenv:venv]
45commands = {posargs}
James E. Blaircb462342013-01-15 10:03:53 -080046
47[testenv:validate-layout]
48commands = zuul-server -c etc/zuul.conf-sample -t -l {posargs}
Monty Taylor6bef8ef2013-06-02 08:17:12 -040049
James E. Blairf88b8172017-01-24 13:37:21 -080050[testenv:nodepool]
51setenv =
52 OS_TEST_PATH = ./tests/nodepool
Clark Boylan3b6bb102017-04-07 17:37:06 -070053commands = python setup.py test --slowest --testr-args='--concurrency=1 {posargs}'
James E. Blairf88b8172017-01-24 13:37:21 -080054
Monty Taylor6bef8ef2013-06-02 08:17:12 -040055[flake8]
Joshua Hesketh29d99b72014-08-19 16:27:42 +100056# These are ignored intentionally in openstack-infra projects;
57# please don't submit patches that solely correct them or enable them.
David Shrewsbury699a6b22017-05-19 09:38:36 -040058ignore = E125,E129,E402,H,W503
Monty Taylor6bef8ef2013-06-02 08:17:12 -040059show-source = True
60exclude = .venv,.tox,dist,doc,build,*.egg