The Gatekeeper, or a project gating system
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tox.ini 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. [tox]
  2. minversion = 3.1
  3. skipsdist = True
  4. envlist = pep8,py35
  5. ignore_basepython_conflict = True
  6. [testenv]
  7. basepython = python3
  8. install_command = bash tools/pip.sh {opts} {packages}
  9. setenv =
  10. VIRTUAL_ENV={envdir}
  11. OS_TEST_TIMEOUT=240
  12. OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:1}
  13. OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:1}
  14. OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:1}
  15. OS_LOG_DEFAULTS={env:OS_LOG_DEFAULTS:""}
  16. passenv =
  17. ZUUL_TEST_ROOT
  18. OS_STDOUT_CAPTURE
  19. OS_STDERR_CAPTURE
  20. OS_LOG_CAPTURE
  21. OS_LOG_DEFAULTS
  22. NODEPOOL_ZK_HOST
  23. ZUUL_MYSQL_HOST
  24. ZUUL_POSTGRES_HOST
  25. usedevelop = True
  26. whitelist_externals = bash
  27. deps =
  28. -r{toxinidir}/requirements.txt
  29. -r{toxinidir}/test-requirements.txt
  30. commands =
  31. stestr run {posargs}
  32. stestr slowest
  33. [testenv:bindep]
  34. # Do not install any requirements. We want this to be fast and work even if
  35. # system dependencies are missing, since it's used to tell you what system
  36. # dependencies are missing! This also means that bindep must be installed
  37. # separately, outside of the requirements files.
  38. install_command = pip install {opts} {packages}
  39. deps = bindep
  40. commands = bindep test
  41. [testenv:pep8]
  42. install_command = pip install {opts} {packages}
  43. # --ignore-missing-imports tells mypy to not try to follow imported modules
  44. # out of the current tree. As you might expect, we don't want to run static
  45. # type checking on the world - just on ourselves.
  46. commands =
  47. flake8 {posargs}
  48. mypy --ignore-missing-imports zuul
  49. [testenv:cover]
  50. install_command = pip install {opts} {packages}
  51. setenv =
  52. {[testenv]setenv}
  53. PYTHON=coverage run --source zuul --parallel-mode
  54. commands =
  55. stestr run {posargs}
  56. coverage combine
  57. coverage html -d cover
  58. coverage xml -o cover/coverage.xml
  59. [testenv:docs]
  60. install_command = pip install {opts} {packages}
  61. deps =
  62. -r{toxinidir}/doc/requirements.txt
  63. -r{toxinidir}/test-requirements.txt
  64. commands =
  65. sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html
  66. [testenv:venv]
  67. install_command = pip install {opts} {packages}
  68. commands = {posargs}
  69. [testenv:nodepool]
  70. commands =
  71. stestr run --concurrency=1 --test-path ./tests/nodepool {posargs}
  72. [testenv:remote]
  73. passenv =
  74. ZUUL_TEST_ROOT
  75. OS_STDOUT_CAPTURE
  76. OS_STDERR_CAPTURE
  77. OS_LOG_CAPTURE
  78. OS_LOG_DEFAULTS
  79. NODEPOOL_ZK_HOST
  80. ZUUL_REMOTE_IPV4
  81. ZUUL_SSH_KEY
  82. commands =
  83. stestr run --test-path ./tests/remote {posargs}
  84. [flake8]
  85. # These are ignored intentionally in openstack-infra projects;
  86. # please don't submit patches that solely correct them or enable them.
  87. ignore = E124,E125,E129,E252,E402,E741,H,W503,W504
  88. show-source = True
  89. exclude = .venv,.tox,dist,doc,build,*.egg,node_modules