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.
 
 
 
 
 
 

46 lines
1.5 KiB

  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/base/hosts.yaml
  21. # parses, but doesn't do anything.
  22. bash -c "ANSIBLE_INVENTORY_PLUGINS=./playbooks/roles/install-ansible/files/inventory_plugins ansible -i ./inventory/base/hosts.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. # This environment assumes a gate-hosts.yaml file has been written.
  32. passenv =
  33. TESTINFRA_EXTRA_DATA
  34. commands = py.test --junit-xml junit.xml --connection=ansible --ansible-inventory=/home/zuul/src/opendev.org/opendev/system-config/inventory/base/gate-hosts.yaml -v testinfra {posargs}
  35. [flake8]
  36. show-source = True
  37. exclude = .tox,.eggs
  38. ignore = E125,H
  39. select = H231