A collection of python libraries for the Validation Framework
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.

92 lines
2.4 KiB

  1. [tox]
  2. minversion = 3.2.0
  3. envlist = linters,docs,py38
  4. skipdist = True
  5. [testenv]
  6. usedevelop = True
  7. passenv = *
  8. setenv =
  9. # pip: Avoid 2020-01-01 warnings: https://github.com/pypa/pip/issues/6207
  10. # paramiko CryptographyDeprecationWarning: https://github.com/ansible/ansible/issues/52598
  11. PYTHONWARNINGS=ignore:DEPRECATION::pip._internal.cli.base_command,ignore::UserWarning
  12. PIP_DISABLE_PIP_VERSION_CHECK=1
  13. commands =
  14. stestr run {posargs}
  15. stestr slowest
  16. sitepackages = True
  17. deps =
  18. -c {env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
  19. -r {toxinidir}/requirements.txt
  20. -r {toxinidir}/test-requirements.txt
  21. whitelist_externals = bash
  22. [testenv:bindep]
  23. # Do not install any requirements. We want this to be fast and work even if
  24. # system dependencies are missing, since it's used to tell you what system
  25. # dependencies are missing! This also means that bindep must be installed
  26. # separately, outside of the requirements files.
  27. deps = bindep
  28. commands = bindep test
  29. [testenv:debug]
  30. commands = oslo_debug_helper {posargs}
  31. [testenv:pep8]
  32. envdir = {toxworkdir}/linters
  33. commands =
  34. python -m pre_commit run flake8 -a
  35. [testenv:whitespace]
  36. envdir = {toxworkdir}/linters
  37. deps = {[testenv:linters]deps}
  38. commands =
  39. python -m pre_commit run trailing-whitespace -a
  40. [testenv:shebangs]
  41. envdir = {toxworkdir}/linters
  42. deps = {[testenv:linters]deps}
  43. commands =
  44. python -m pre_commit run check-executables-have-shebangs -a
  45. [testenv:linters]
  46. deps =
  47. -r {toxinidir}/requirements.txt
  48. -r {toxinidir}/test-requirements.txt
  49. commands =
  50. {[testenv:whitespace]commands}
  51. {[testenv:shebangs]commands}
  52. [testenv:cover]
  53. deps =
  54. -r {toxinidir}/requirements.txt
  55. -r {toxinidir}/test-requirements.txt
  56. commands = python setup.py test --coverage --testr-args='{posargs}'
  57. [testenv:docs]
  58. deps =
  59. -r {toxinidir}/requirements.txt
  60. -r {toxinidir}/test-requirements.txt
  61. -r {toxinidir}/doc/requirements.txt
  62. commands=
  63. sphinx-build -W -b html doc/source doc/build/html
  64. doc8 doc
  65. [testenv:pdf-docs]
  66. whitelist_externals = make
  67. deps = {[testenv:docs]deps}
  68. commands =
  69. sphinx-build -W -b latex doc/source doc/build/pdf
  70. make -C doc/build/pdf
  71. [doc8]
  72. # Settings for doc8:
  73. extensions = .rst
  74. ignore = D001
  75. [testenv:lower-constraints]
  76. deps =
  77. -c{toxinidir}/lower-constraints.txt
  78. -r{toxinidir}/test-requirements.txt
  79. -r{toxinidir}/requirements.txt