Library for running OpenStack services
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 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [tox]
  2. minversion = 2.0
  3. envlist = py35,py27,pep8,bandit
  4. [testenv]
  5. setenv =
  6. VIRTUAL_ENV={envdir}
  7. BRANCH_NAME=master
  8. CLIENT_NAME=oslo.service
  9. install_command = pip install {opts} {packages}
  10. deps =
  11. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  12. -r{toxinidir}/test-requirements.txt
  13. -r{toxinidir}/requirements.txt
  14. whitelist_externals = find
  15. commands =
  16. find . -type f -name "*.py[co]" -delete
  17. stestr run --slowest {posargs}
  18. [testenv:pep8]
  19. basepython = python3
  20. commands =
  21. flake8
  22. bandit -r oslo_service -n5 -x tests
  23. doc8 --ignore-path "doc/source/history.rst" doc/source
  24. [testenv:venv]
  25. basepython = python3
  26. commands = {posargs}
  27. [testenv:docs]
  28. basepython = python3
  29. commands = python setup.py build_sphinx
  30. [testenv:cover]
  31. basepython = python3
  32. commands = python setup.py test --coverage --coverage-package-name=oslo_service --testr-args='{posargs}'
  33. [flake8]
  34. # E123, E125 skipped as they are invalid PEP-8.
  35. # E731 skipped as assign a lambda expression
  36. show-source = True
  37. ignore = E123,E125,E731
  38. exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
  39. [hacking]
  40. import_exceptions = oslo_service._i18n
  41. [testenv:debug]
  42. basepython = python3
  43. commands = oslo_debug_helper -t oslo_service/tests {posargs}
  44. [testenv:bandit]
  45. basepython = python3
  46. deps =
  47. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  48. -r{toxinidir}/test-requirements.txt
  49. -r{toxinidir}/requirements.txt
  50. commands = bandit -r oslo_service -n5 -x tests {posargs}
  51. [testenv:releasenotes]
  52. basepython = python3
  53. commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  54. [testenv:lower-constraints]
  55. basepython = python3
  56. deps =
  57. -c{toxinidir}/lower-constraints.txt
  58. -r{toxinidir}/test-requirements.txt
  59. -r{toxinidir}/requirements.txt