System configuration for OpenStack Infrastructure
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.

43 lines
1.4KB

  1. [tox]
  2. minversion = 1.6
  3. envlist = linters
  4. skipsdist = True
  5. [testenv]
  6. basepython = python3
  7. usedevelop = True
  8. install_command = pip install {opts} {packages}
  9. deps = -r{toxinidir}/test-requirements.txt
  10. [testenv:linters]
  11. whitelist_externals = bash
  12. setenv =
  13. ANSIBLE_LIBRARY= {toxinidir}/tools/fake-ansible/library
  14. commands =
  15. flake8
  16. {toxinidir}/tools/run-bashate.sh
  17. python3 {toxinidir}/tools/sorted_modules_env.py {toxinidir}/modules.env
  18. python3 {toxinidir}/tools/irc_checks.py
  19. python3 {toxinidir}/tools/check_clouds_yaml.py
  20. # The following command validates that inventory/openstack.yaml
  21. # parses, but doesn't do anything.
  22. bash -c "ANSIBLE_INVENTORY_PLUGINS=./playbooks/roles/install-ansible/files/inventory_plugins ansible -i ./inventory/openstack.yaml not_a_host -a 'true'"
  23. python3 -m unittest playbooks/roles/install-ansible/files/inventory_plugins/test_yamlgroup.py
  24. bash -c "find roles playbooks -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 ansible-lint"
  25. [testenv:venv]
  26. commands = {posargs}
  27. [testenv:docs]
  28. deps = -r{toxinidir}/doc/requirements.txt
  29. commands = sphinx-build -W -E -b html doc/source doc/build/html
  30. [testenv:testinfra]
  31. commands = py.test --junit-xml junit.xml --connection=ansible --ansible-inventory=/etc/ansible/hosts/inventory.yaml -v testinfra {posargs}
  32. [flake8]
  33. show-source = True
  34. exclude = .tox,.eggs
  35. ignore = E125,H
  36. select = H231