Role os_tacker for OpenStack-Ansible
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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. [tox]
  2. minversion = 2.0
  3. skipsdist = True
  4. envlist = docs,linters,functional
  5. [testenv]
  6. usedevelop = True
  7. install_command =
  8. pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
  9. commands =
  10. /usr/bin/find . -type f -name "*.pyc" -delete
  11. passenv =
  12. COMMON_TESTS_PATH
  13. HOME
  14. http_proxy
  15. HTTP_PROXY
  16. https_proxy
  17. HTTPS_PROXY
  18. no_proxy
  19. NO_PROXY
  20. TESTING_BRANCH
  21. TESTING_HOME
  22. USER
  23. whitelist_externals =
  24. bash
  25. setenv =
  26. PYTHONUNBUFFERED=1
  27. ROLE_NAME=os_tacker
  28. VIRTUAL_ENV={envdir}
  29. WORKING_DIR={toxinidir}
  30. [testenv:docs]
  31. basepython = python3
  32. deps = -r{toxinidir}/doc/requirements.txt
  33. commands=
  34. bash -c "rm -rf doc/build"
  35. doc8 doc
  36. sphinx-build -b html doc/source doc/build/html
  37. [doc8]
  38. # Settings for doc8:
  39. extensions = .rst
  40. [testenv:releasenotes]
  41. basepython = python3
  42. deps = -r{toxinidir}/doc/requirements.txt
  43. commands =
  44. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  45. # environment used by the -infra templated docs job
  46. [testenv:venv]
  47. basepython = python3
  48. commands =
  49. {posargs}
  50. [testenv:pep8]
  51. basepython = python3
  52. commands =
  53. bash -c "{toxinidir}/tests/common/test-pep8.sh"
  54. [flake8]
  55. # Ignores the following rules due to how ansible modules work in general
  56. # F403 'from ansible.module_utils.basic import *' used;
  57. # unable to detect undefined names
  58. # H303 No wildcard (*) import.
  59. ignore=F403,H303
  60. [testenv:bashate]
  61. basepython = python3
  62. commands =
  63. bash -c "{toxinidir}/tests/common/test-bashate.sh"
  64. [testenv:ansible-syntax]
  65. basepython = python3
  66. commands =
  67. bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
  68. [testenv:ansible-lint]
  69. basepython = python3
  70. commands =
  71. bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
  72. [testenv:functional]
  73. commands =
  74. bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
  75. [testenv:linters]
  76. basepython = python3
  77. deps =
  78. -r{toxinidir}/doc/requirements.txt
  79. commands =
  80. bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
  81. {[testenv:pep8]commands}
  82. {[testenv:bashate]commands}
  83. {[testenv:ansible-lint]commands}
  84. {[testenv:ansible-syntax]commands}
  85. {[testenv:docs]commands}