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.9KB

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