Ansible deployment of the Kolla containers
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.

108 lines
3.3KB

  1. [tox]
  2. minversion = 2.5.0
  3. skipsdist = True
  4. envlist = py37,pep8,pypy
  5. [testenv]
  6. basepython = python3
  7. usedevelop=True
  8. whitelist_externals = find
  9. rm
  10. install_command = pip install {opts} {packages}
  11. deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  12. -r{toxinidir}/requirements.txt
  13. -r{toxinidir}/test-requirements.txt
  14. passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
  15. OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE OS_TEST_TIMEOUT
  16. PYTHON OS_TEST_PATH LISTOPT IDOPTION
  17. commands =
  18. find . -type f -name "*.py[c|o]" -delete -o -type l -name "*.py[c|o]" -delete
  19. find . -type d -name "__pycache__" -delete
  20. stestr run --slowest {posargs}
  21. [testenv:debug]
  22. commands = oslo_debug_helper -t tests {posargs}
  23. [testenv:cover]
  24. setenv = VIRTUAL_ENV={envdir}
  25. NOSE_WITH_COVERAGE=1
  26. NOSE_COVER_BRANCHES=1
  27. NOSE_COVER_HTML=1
  28. NOSE_COVER_HTML_DIR={toxinidir}/cover
  29. PYTHON=coverage run --source kolla_ansible,ansible/action_plugins,ansible/library,ansible/roles/keystone/files/ --parallel-mode
  30. commands =
  31. stestr run {posargs}
  32. coverage combine
  33. coverage html -d cover
  34. coverage xml -o cover/coverage.xml
  35. [testenv:pep8]
  36. # sphinx needs to be installed to make doc8 work properly
  37. deps =
  38. {[testenv]deps}
  39. -r{toxinidir}/doc/requirements.txt
  40. yamllint
  41. commands =
  42. {toxinidir}/tools/run-bashate.sh
  43. flake8 {posargs}
  44. doc8 doc/source
  45. python {toxinidir}/tools/validate-all-file.py
  46. bandit --skip B303 -r ansible kolla_ansible tests tools
  47. yamllint -s .
  48. [testenv:bandit]
  49. # B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function.
  50. commands = bandit --skip B303 -r ansible kolla_ansible tests tools
  51. [testenv:venv]
  52. deps =
  53. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  54. -r{toxinidir}/test-requirements.txt
  55. -r{toxinidir}/doc/requirements.txt
  56. commands = {posargs}
  57. [testenv:docs]
  58. deps =
  59. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  60. -r{toxinidir}/requirements.txt
  61. -r{toxinidir}/doc/requirements.txt
  62. commands =
  63. rm -rf doc/build
  64. sphinx-build -W --keep-going -b html doc/source doc/build/html
  65. [testenv:deploy-guide]
  66. deps =
  67. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  68. -r{toxinidir}/requirements.txt
  69. -r{toxinidir}/doc/requirements.txt
  70. commands =
  71. rm -rf deploy-guide/build
  72. sphinx-build -a -E -W -d deploy-guide/build/doctrees --keep-going -b html deploy-guide/source deploy-guide/build/html
  73. [testenv:pdf-docs]
  74. whitelist_externals = make
  75. deps = {[testenv:docs]deps}
  76. commands =
  77. sphinx-build -W --keep-going -b latex doc/source doc/build/pdf
  78. make -C doc/build/pdf
  79. [testenv:releasenotes]
  80. deps =
  81. -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
  82. -r{toxinidir}/requirements.txt
  83. -r{toxinidir}/doc/requirements.txt
  84. commands =
  85. rm -rf releasenotes/build
  86. sphinx-build -a -E -W -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html
  87. [flake8]
  88. show-source = True
  89. exclude=.eggs,.git,.tox,doc
  90. [testenv:lower-constraints]
  91. deps =
  92. -c{toxinidir}/lower-constraints.txt
  93. -r{toxinidir}/test-requirements.txt
  94. -r{toxinidir}/requirements.txt