Zuul base job definition
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.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. [tox]
  2. minversion = 1.6
  3. skipsdist = True
  4. envlist = linters
  5. [testenv]
  6. basepython = python3
  7. install_command = pip install {opts} {packages}
  8. deps = -r{toxinidir}/test-requirements.txt
  9. commands =
  10. python setup.py testr --slowest --testr-args='{posargs}'
  11. [testenv:bindep]
  12. # Do not install any requirements. We want this to be fast and work even if
  13. # system dependencies are missing, since it's used to tell you what system
  14. # dependencies are missing! This also means that bindep must be installed
  15. # separately, outside of the requirements files.
  16. deps = bindep
  17. commands = bindep test
  18. [testenv:docs]
  19. commands =
  20. sphinx-build -E -W -d doc/build/doctrees -b html doc/source/ doc/build/html
  21. [testenv:linters]
  22. basepython = python3
  23. whitelist_externals = bash
  24. setenv =
  25. ANSIBLE_LIBRARY= {envdir}/src/zuul/zuul/ansible/base/library
  26. passenv =
  27. # NOTE(pabelanger): if you'd like to run tox -elinters locally, you'll need
  28. # to export ANSIBLE_ROLES_PATH pointing to the currect repos.
  29. # see infra-zuul-jobs-linters job for more information.
  30. ANSIBLE_ROLES_PATH
  31. # Add dependencies here since other jobs use python2 and zuul requires
  32. # python3.
  33. deps =
  34. # Zuul is required to supply the zuul ansible modules for ansible-lint
  35. -egit+https://opendev.org/zuul/zuul#egg=zuul
  36. -r{toxinidir}/test-requirements.txt
  37. commands =
  38. flake8 {posargs}
  39. # Ansible lint
  40. # [ANSIBLE0012] Commands should not change things if nothing needs doing
  41. bash -c "find playbooks -type f -regex '.*.ya?ml' -print0 | \
  42. xargs -t -n1 -0 ansible-lint -xANSIBLE0012"
  43. # Ansible Syntax Check
  44. bash -c "find playbooks -type f -regex '.*.ya?ml' -exec \
  45. ansible-playbook --syntax-check -i {toxinidir}/tests/inventory \
  46. \{\} + > /dev/null"
  47. [testenv:venv]
  48. commands = {posargs}
  49. [flake8]
  50. # These are ignored intentionally in openstack-infra projects;
  51. # please don't submit patches that solely correct them or enable them.
  52. # E402 - ansible modules put documentation before imports. Align to ansible.
  53. ignore = E125,E129,E402,H
  54. show-source = True
  55. exclude = .venv,.tox,dist,doc,build,*.egg