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.

107 lines
2.9KB

  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 --slowest --concurrency=`python -c "import multiprocessing; print(int(multiprocessing.cpu_count()/2))"` {posargs}'
  37. [testenv:bindep]
  38. # Do not install any requirements. We want this to be fast and work even if
  39. # system dependencies are missing, since it's used to tell you what system
  40. # dependencies are missing! This also means that bindep must be installed
  41. # separately, outside of the requirements files.
  42. usedevelop = False
  43. install_command = pip install {opts} {packages}
  44. deps = bindep
  45. commands = bindep test
  46. [testenv:pep8]
  47. install_command = pip install {opts} {packages}
  48. # --ignore-missing-imports tells mypy to not try to follow imported modules
  49. # out of the current tree. As you might expect, we don't want to run static
  50. # type checking on the world - just on ourselves.
  51. deps =
  52. flake8
  53. mypy<0.650
  54. openapi-spec-validator
  55. commands =
  56. flake8 {posargs}
  57. mypy --ignore-missing-imports zuul
  58. openapi-spec-validator web/public/openapi.yaml
  59. [testenv:cover]
  60. setenv =
  61. {[testenv]setenv}
  62. PYTHON=coverage run --source zuul --parallel-mode
  63. commands =
  64. stestr run {posargs}
  65. coverage combine
  66. coverage html -d cover
  67. coverage xml -o cover/coverage.xml
  68. [testenv:docs]
  69. install_command = pip install {opts} {packages}
  70. deps =
  71. -r{toxinidir}/doc/requirements.txt
  72. -r{toxinidir}/test-requirements.txt
  73. commands =
  74. sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html
  75. [testenv:venv]
  76. commands = {posargs}
  77. [testenv:nodepool]
  78. commands =
  79. stestr run --concurrency=1 --test-path ./tests/nodepool {posargs}
  80. [testenv:remote]
  81. passenv =
  82. ZUUL_TEST_ROOT
  83. OS_STDOUT_CAPTURE
  84. OS_STDERR_CAPTURE
  85. OS_LOG_CAPTURE
  86. OS_LOG_DEFAULTS
  87. NODEPOOL_ZK_HOST
  88. ZUUL_REMOTE_IPV4
  89. ZUUL_SSH_KEY
  90. commands =
  91. stestr run --test-path ./tests/remote {posargs}
  92. [flake8]
  93. # These are ignored intentionally in zuul projects;
  94. # please don't submit patches that solely correct them or enable them.
  95. ignore = E124,E125,E129,E252,E402,E741,H,W503,W504
  96. show-source = True
  97. exclude = .venv,.tox,dist,doc,build,*.egg,node_modules