OpenStack library for messaging
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 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. [tox]
  2. minversion = 2.0
  3. envlist = py37,py27,pep8
  4. [testenv]
  5. setenv =
  6. VIRTUAL_ENV={envdir}
  7. passenv = OS_*
  8. ZUUL_CACHE_DIR
  9. REQUIREMENTS_PIP_LOCATION
  10. install_command = pip install {opts} {packages}
  11. deps =
  12. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  13. -r{toxinidir}/test-requirements.txt
  14. -r{toxinidir}/requirements.txt
  15. commands = stestr run --slowest {posargs}
  16. [testenv:pep8]
  17. basepython = python3
  18. commands =
  19. flake8
  20. # run security linter
  21. bandit -r oslo_messaging -x tests -n5
  22. [testenv:cover]
  23. basepython = python3
  24. setenv =
  25. PYTHON=coverage run --source oslo_messaging --parallel-mode
  26. commands =
  27. stestr run --slowest {posargs}
  28. coverage combine
  29. coverage html -d cover
  30. coverage report
  31. [testenv:venv]
  32. basepython = python3
  33. commands = {posargs}
  34. [testenv:docs]
  35. basepython = python3
  36. deps = -r{toxinidir}/doc/requirements.txt
  37. commands = sphinx-build -W -b html doc/source doc/build/html
  38. [testenv:py27-func-rabbit]
  39. basepython = python2.7
  40. setenv =
  41. {[testenv]setenv}
  42. TRANSPORT_DRIVER=rabbit
  43. commands = pifpaf run rabbitmq -- stestr run --slowest {posargs:oslo_messaging.tests.functional}
  44. [testenv:py36-func-rabbit]
  45. basepython = python3.6
  46. setenv =
  47. {[testenv]setenv}
  48. TRANSPORT_DRIVER=rabbit
  49. commands = pifpaf run rabbitmq -- stestr run --slowest {posargs:oslo_messaging.tests.functional}
  50. [testenv:py27-func-kafka]
  51. basepython = python2.7
  52. setenv =
  53. {[testenv]setenv}
  54. TRANSPORT_URL=kafka://127.0.0.1:9092/
  55. OS_GROUP_REGEX=oslo_messaging.tests.functional
  56. commands = {toxinidir}/setup-test-env-kafka.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
  57. [testenv:py27-func-amqp1]
  58. basepython = python2.7
  59. setenv =
  60. {[testenv]setenv}
  61. TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5672//
  62. ENVNAME={envname}
  63. WORKDIR={toxworkdir}
  64. commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
  65. [testenv:py36-func-amqp1]
  66. basepython = python3.6
  67. setenv =
  68. {[testenv]setenv}
  69. TRANSPORT_URL=amqp://stackqpid:secretqpid@127.0.0.1:5672//
  70. ENVNAME={envname}
  71. WORKDIR={toxworkdir}
  72. commands = {toxinidir}/tools/setup-test-env-amqp1.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
  73. [testenv:py36-func-kafka]
  74. basepython = python3.6
  75. setenv =
  76. {[testenv]setenv}
  77. TRANSPORT_URL=kafka://127.0.0.1:9092/
  78. OS_GROUP_REGEX=oslo_messaging.tests.functional
  79. commands = {toxinidir}/setup-test-env-kafka.sh stestr run --slowest {posargs:oslo_messaging.tests.functional}
  80. [testenv:bandit]
  81. # NOTE(kgiusti): This is required for the integration test job of the bandit
  82. # project. Please do not remove.
  83. basepython = python3
  84. commands = bandit -r oslo_messaging -x tests -n5
  85. [flake8]
  86. # E731 skipped as assign a lambda expression
  87. show-source = True
  88. enable-extensions = H203,H106
  89. ignore = E731,H405
  90. exclude = .tox,dist,doc,*.egg,build,__init__.py
  91. [hacking]
  92. import_exceptions =
  93. oslo_messaging._i18n
  94. six.moves
  95. local-check-factory = oslo_messaging.hacking.checks.factory
  96. [testenv:releasenotes]
  97. basepython = python3
  98. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  99. deps = -r{toxinidir}/doc/requirements.txt
  100. [testenv:bindep]
  101. basepython = python3
  102. deps = bindep
  103. commands = bindep {posargs}
  104. [testenv:lower-constraints]
  105. basepython = python3
  106. deps =
  107. -c{toxinidir}/lower-constraints.txt
  108. -r{toxinidir}/test-requirements.txt
  109. -r{toxinidir}/requirements.txt