James E. Blair | 1e8dd89 | 2012-05-30 09:15:05 -0700 | [diff] [blame] | 1 | [tox] |
zhaoxinyu | 363e564 | 2013-09-18 16:05:24 -0700 | [diff] [blame] | 2 | minversion = 1.6 |
Monty Taylor | 5f2feaf | 2013-09-19 07:47:01 -0700 | [diff] [blame] | 3 | skipsdist = True |
Monty Taylor | 777c58a | 2017-06-16 10:26:45 -0500 | [diff] [blame] | 4 | envlist = pep8,py35 |
James E. Blair | b0fcae4 | 2012-07-17 11:12:10 -0700 | [diff] [blame] | 5 | |
| 6 | [testenv] |
Monty Taylor | 777c58a | 2017-06-16 10:26:45 -0500 | [diff] [blame] | 7 | basepython = python3 |
James E. Blair | ded241e | 2017-10-10 13:22:40 -0700 | [diff] [blame] | 8 | setenv = VIRTUAL_ENV={envdir} |
James E. Blair | 267e516 | 2017-04-07 10:08:20 -0700 | [diff] [blame] | 9 | OS_TEST_TIMEOUT=120 |
James E. Blair | 1c236df | 2017-02-01 14:07:24 -0800 | [diff] [blame] | 10 | passenv = ZUUL_TEST_ROOT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_LOG_DEFAULTS |
Monty Taylor | 5f2feaf | 2013-09-19 07:47:01 -0700 | [diff] [blame] | 11 | usedevelop = True |
zhaoxinyu | 363e564 | 2013-09-18 16:05:24 -0700 | [diff] [blame] | 12 | install_command = pip install {opts} {packages} |
Monty Taylor | 4998315 | 2013-06-02 08:42:01 -0400 | [diff] [blame] | 13 | deps = -r{toxinidir}/requirements.txt |
| 14 | -r{toxinidir}/test-requirements.txt |
Monty Taylor | bc75883 | 2013-06-17 17:22:42 -0400 | [diff] [blame] | 15 | commands = |
Clark Boylan | 3b6bb10 | 2017-04-07 17:37:06 -0700 | [diff] [blame] | 16 | python setup.py test --slowest --testr-args='{posargs}' |
James E. Blair | 1e8dd89 | 2012-05-30 09:15:05 -0700 | [diff] [blame] | 17 | |
Paul Belanger | e23f599 | 2016-06-03 23:44:15 -0400 | [diff] [blame] | 18 | [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. |
| 23 | deps = bindep |
| 24 | commands = bindep test |
| 25 | |
James E. Blair | 1e8dd89 | 2012-05-30 09:15:05 -0700 | [diff] [blame] | 26 | [testenv:pep8] |
Monty Taylor | fb8f5a4 | 2017-07-27 12:41:34 -0500 | [diff] [blame] | 27 | # --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. |
| 30 | commands = |
| 31 | flake8 {posargs} |
| 32 | mypy --ignore-missing-imports zuul |
James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame] | 33 | |
| 34 | [testenv:cover] |
Monty Taylor | bc75883 | 2013-06-17 17:22:42 -0400 | [diff] [blame] | 35 | commands = |
Clark Boylan | 3b6bb10 | 2017-04-07 17:37:06 -0700 | [diff] [blame] | 36 | python setup.py test --coverage |
James E. Blair | ff986a1 | 2012-05-30 14:56:51 -0700 | [diff] [blame] | 37 | |
Monty Taylor | ffd90ea | 2014-09-08 13:47:38 -0700 | [diff] [blame] | 38 | [testenv:docs] |
Antoine Musso | d70f3d8 | 2014-01-10 16:36:44 +0100 | [diff] [blame] | 39 | commands = python setup.py build_sphinx |
| 40 | |
James E. Blair | cdd0007 | 2012-06-08 19:17:28 -0700 | [diff] [blame] | 41 | [testenv:venv] |
| 42 | commands = {posargs} |
James E. Blair | cb46234 | 2013-01-15 10:03:53 -0800 | [diff] [blame] | 43 | |
| 44 | [testenv:validate-layout] |
| 45 | commands = zuul-server -c etc/zuul.conf-sample -t -l {posargs} |
Monty Taylor | 6bef8ef | 2013-06-02 08:17:12 -0400 | [diff] [blame] | 46 | |
James E. Blair | f88b817 | 2017-01-24 13:37:21 -0800 | [diff] [blame] | 47 | [testenv:nodepool] |
| 48 | setenv = |
| 49 | OS_TEST_PATH = ./tests/nodepool |
Clark Boylan | 3b6bb10 | 2017-04-07 17:37:06 -0700 | [diff] [blame] | 50 | commands = python setup.py test --slowest --testr-args='--concurrency=1 {posargs}' |
James E. Blair | f88b817 | 2017-01-24 13:37:21 -0800 | [diff] [blame] | 51 | |
Monty Taylor | 6bef8ef | 2013-06-02 08:17:12 -0400 | [diff] [blame] | 52 | [flake8] |
Joshua Hesketh | 29d99b7 | 2014-08-19 16:27:42 +1000 | [diff] [blame] | 53 | # These are ignored intentionally in openstack-infra projects; |
| 54 | # please don't submit patches that solely correct them or enable them. |
David Shrewsbury | 699a6b2 | 2017-05-19 09:38:36 -0400 | [diff] [blame] | 55 | ignore = E125,E129,E402,H,W503 |
Monty Taylor | 6bef8ef | 2013-06-02 08:17:12 -0400 | [diff] [blame] | 56 | show-source = True |
| 57 | exclude = .venv,.tox,dist,doc,build,*.egg |