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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. 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. commands =
  52. flake8 {posargs}
  53. mypy --ignore-missing-imports zuul
  54. openapi-spec-validator web/public/openapi.yaml
  55. [testenv:cover]
  56. setenv =
  57. {[testenv]setenv}
  58. PYTHON=coverage run --source zuul --parallel-mode
  59. commands =
  60. stestr run {posargs}
  61. coverage combine
  62. coverage html -d cover
  63. coverage xml -o cover/coverage.xml
  64. [testenv:docs]
  65. install_command = pip install {opts} {packages}
  66. deps =
  67. -r{toxinidir}/doc/requirements.txt
  68. -r{toxinidir}/test-requirements.txt
  69. commands =
  70. sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html
  71. [testenv:venv]
  72. commands = {posargs}
  73. [testenv:nodepool]
  74. commands =
  75. stestr run --concurrency=1 --test-path ./tests/nodepool {posargs}
  76. [testenv:remote]
  77. passenv =
  78. ZUUL_TEST_ROOT
  79. OS_STDOUT_CAPTURE
  80. OS_STDERR_CAPTURE
  81. OS_LOG_CAPTURE
  82. OS_LOG_DEFAULTS
  83. NODEPOOL_ZK_HOST
  84. ZUUL_REMOTE_IPV4
  85. ZUUL_SSH_KEY
  86. commands =
  87. stestr run --test-path ./tests/remote {posargs}
  88. [flake8]
  89. # These are ignored intentionally in zuul projects;
  90. # please don't submit patches that solely correct them or enable them.
  91. ignore = E124,E125,E129,E252,E402,E741,H,W503,W504
  92. show-source = True
  93. exclude = .venv,.tox,dist,doc,build,*.egg,node_modules