blob: 436de6e5f5633393703174b69f77d6d5d9346d2a [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. Blairded241e2017-10-10 13:22:40 -07008setenv = VIRTUAL_ENV={envdir}
James E. Blair267e5162017-04-07 10:08:20 -07009 OS_TEST_TIMEOUT=120
James E. Blair1c236df2017-02-01 14:07:24 -080010passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_LOG_DEFAULTS
Monty Taylor5f2feaf2013-09-19 07:47:01 -070011usedevelop = True
zhaoxinyu363e5642013-09-18 16:05:24 -070012install_command = pip install {opts} {packages}
Monty Taylor49983152013-06-02 08:42:01 -040013deps = -r{toxinidir}/requirements.txt
14 -r{toxinidir}/test-requirements.txt
Monty Taylorbc758832013-06-17 17:22:42 -040015commands =
Clark Boylan3b6bb102017-04-07 17:37:06 -070016 python setup.py test --slowest --testr-args='{posargs}'
James E. Blair1e8dd892012-05-30 09:15:05 -070017
Paul Belangere23f5992016-06-03 23:44:15 -040018[testenv:bindep]
19# Do not install any requirements. We want this to be fast and work even if
20# system dependencies are missing, since it's used to tell you what system
21# dependencies are missing! This also means that bindep must be installed
22# separately, outside of the requirements files.
23deps = bindep
24commands = bindep test
25
James E. Blair1e8dd892012-05-30 09:15:05 -070026[testenv:pep8]
Monty Taylorfb8f5a42017-07-27 12:41:34 -050027# --ignore-missing-imports tells mypy to not try to follow imported modules
28# out of the current tree. As you might expect, we don't want to run static
29# type checking on the world - just on ourselves.
30commands =
31 flake8 {posargs}
32 mypy --ignore-missing-imports zuul
James E. Blaircdd00072012-06-08 19:17:28 -070033
34[testenv:cover]
Monty Taylorbc758832013-06-17 17:22:42 -040035commands =
Clark Boylan3b6bb102017-04-07 17:37:06 -070036 python setup.py test --coverage
James E. Blairff986a12012-05-30 14:56:51 -070037
Monty Taylorffd90ea2014-09-08 13:47:38 -070038[testenv:docs]
Antoine Mussod70f3d82014-01-10 16:36:44 +010039commands = python setup.py build_sphinx
40
James E. Blaircdd00072012-06-08 19:17:28 -070041[testenv:venv]
42commands = {posargs}
James E. Blaircb462342013-01-15 10:03:53 -080043
James E. Blairf88b8172017-01-24 13:37:21 -080044[testenv:nodepool]
45setenv =
46 OS_TEST_PATH = ./tests/nodepool
Clark Boylan3b6bb102017-04-07 17:37:06 -070047commands = python setup.py test --slowest --testr-args='--concurrency=1 {posargs}'
James E. Blairf88b8172017-01-24 13:37:21 -080048
Monty Taylor6bef8ef2013-06-02 08:17:12 -040049[flake8]
Joshua Hesketh29d99b72014-08-19 16:27:42 +100050# These are ignored intentionally in openstack-infra projects;
51# please don't submit patches that solely correct them or enable them.
Tristan Cacqueray862d6852018-01-17 02:24:34 +000052ignore = E124,E125,E129,E402,E741,H,W503
Monty Taylor6bef8ef2013-06-02 08:17:12 -040053show-source = True
54exclude = .venv,.tox,dist,doc,build,*.egg