Role os_monasca 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.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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_monasca
  28. TEST_IDEMPOTENCE=false
  29. VIRTUAL_ENV={envdir}
  30. WORKING_DIR={toxinidir}
  31. [testenv:docs]
  32. basepython = python3
  33. deps = -r{toxinidir}/doc/requirements.txt
  34. commands=
  35. bash -c "rm -rf doc/build"
  36. doc8 doc
  37. sphinx-build -b html doc/source doc/build/html
  38. [doc8]
  39. # Settings for doc8:
  40. extensions = .rst
  41. [testenv:releasenotes]
  42. basepython = python3
  43. deps = -r{toxinidir}/doc/requirements.txt
  44. commands =
  45. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  46. # environment used by the -infra templated docs job
  47. [testenv:venv]
  48. basepython = python3
  49. commands =
  50. {posargs}
  51. [testenv:pep8]
  52. basepython = python3
  53. commands =
  54. bash -c "{toxinidir}/tests/common/test-pep8.sh"
  55. [flake8]
  56. # Ignores the following rules due to how ansible modules work in general
  57. # F403 'from ansible.module_utils.basic import *' used;
  58. # unable to detect undefined names
  59. # H303 No wildcard (*) import.
  60. ignore=F403,H303
  61. [testenv:bashate]
  62. basepython = python3
  63. commands =
  64. bash -c "{toxinidir}/tests/common/test-bashate.sh"
  65. [testenv:ansible-syntax]
  66. basepython = python3
  67. commands =
  68. bash -c "{toxinidir}/tests/common/test-ansible-syntax.sh"
  69. [testenv:ansible-lint]
  70. basepython = python3
  71. commands =
  72. bash -c "{toxinidir}/tests/common/test-ansible-lint.sh"
  73. [testenv:functional]
  74. commands =
  75. bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
  76. [testenv:linters]
  77. basepython = python3
  78. commands =
  79. bash -c "{toxinidir}/tests/common/test-ansible-env-prep.sh"
  80. {[testenv:pep8]commands}
  81. {[testenv:bashate]commands}
  82. {[testenv:ansible-lint]commands}
  83. {[testenv:ansible-syntax]commands}