Shared filesystem management project for OpenStack.
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 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. [tox]
  2. minversion = 2.0
  3. skipsdist = True
  4. envlist = py3,py27,pep8
  5. [testenv]
  6. setenv = VIRTUAL_ENV={envdir}
  7. usedevelop = True
  8. install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
  9. whitelist_externals = find
  10. deps = -r{toxinidir}/requirements.txt
  11. -r{toxinidir}/test-requirements.txt
  12. commands =
  13. find . -type f -name "*.py[c|o]" -delete
  14. stestr run {posargs}
  15. stestr slowest
  16. [testenv:releasenotes]
  17. basepython = python3
  18. deps =
  19. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  20. -r{toxinidir}/requirements.txt
  21. -r{toxinidir}/doc/requirements.txt
  22. commands =
  23. rm -rf releasenotes/build
  24. sphinx-build -a -E -W -d releasenotes/build/doctrees \
  25. -b html releasenotes/source releasenotes/build/html
  26. whitelist_externals = rm
  27. [testenv:debug]
  28. basepython = python3
  29. commands = oslo_debug_helper {posargs}
  30. [testenv:debug-py27]
  31. basepython = python2.7
  32. commands = oslo_debug_helper {posargs}
  33. [testenv:debug-py3]
  34. basepython = python3
  35. commands = oslo_debug_helper {posargs}
  36. [testenv:pep8]
  37. # Let's gate pep8 under py3 by default because the py3 checks are stricter.
  38. basepython = python3
  39. commands =
  40. flake8 {posargs}
  41. # Run bashate during pep8 runs to ensure violations are caught by
  42. # the check and gate queues.
  43. bashate -i E006,E042,E043 \
  44. tools/enable-pre-commit-hook.sh \
  45. contrib/ci/pre_test_hook.sh \
  46. contrib/ci/post_test_hook.sh \
  47. devstack/plugin.sh \
  48. devstack/upgrade/from-mitaka/upgrade-manila \
  49. devstack/upgrade/resources.sh \
  50. devstack/upgrade/shutdown.sh \
  51. devstack/upgrade/upgrade.sh \
  52. tools/cover.sh \
  53. tools/check_logging.sh \
  54. tools/coding-checks.sh
  55. {toxinidir}/tools/check_exec.py {toxinidir}/manila
  56. {toxinidir}/tools/check_logging.sh {toxinidir}/manila
  57. [testenv:genconfig]
  58. basepython = python3
  59. whitelist_externals = bash
  60. commands =
  61. oslo-config-generator --config-file etc/oslo-config-generator/manila.conf
  62. [testenv:genpolicy]
  63. basepython = python3
  64. commands = oslopolicy-sample-generator --config-file=etc/manila/manila-policy-generator.conf
  65. [testenv:venv]
  66. basepython = python3
  67. commands = {posargs}
  68. [testenv:docs]
  69. basepython = python3
  70. deps =
  71. -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  72. -r{toxinidir}/requirements.txt
  73. -r{toxinidir}/doc/requirements.txt
  74. commands =
  75. rm -rf doc/build
  76. sphinx-build -W -b html doc/source doc/build/html
  77. # Ignore D001 since we allow lines in excess of 79 characters.
  78. doc8 --ignore D001 --ignore-path .tox --ignore-path doc/build --ignore-path manila.egg-info -e .txt -e .rst -e .inc
  79. whitelist_externals = rm
  80. [testenv:cover]
  81. basepython = python3
  82. setenv =
  83. {[testenv]setenv}
  84. PYTHON=coverage run --source manila --parallel-mode
  85. commands =
  86. {toxinidir}/tools/cover.sh {posargs}
  87. [testenv:fast8]
  88. # Let's run fast8 under py3 by default because the py3 checks are stricter.
  89. basepython = python3
  90. commands =
  91. {toxinidir}/tools/fast8.sh
  92. [testenv:pylint]
  93. basepython = python3
  94. deps = -r{toxinidir}/requirements.txt
  95. -r{toxinidir}/test-requirements.txt
  96. pylint==2.3.1
  97. whitelist_externals = bash
  98. commands = bash ./tools/coding-checks.sh --pylint {posargs}
  99. [testenv:api-ref]
  100. basepython = python3
  101. # This environment is called from CI scripts to test and publish
  102. # the API Ref to developer.openstack.org.
  103. whitelist_externals = rm
  104. commands =
  105. rm -rf api-ref/build
  106. sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
  107. [testenv:dbrevision]
  108. basepython = python3
  109. deps = -r{toxinidir}/requirements.txt
  110. commands = alembic -c manila/db/migrations/alembic.ini revision -m ""{posargs}
  111. [flake8]
  112. # Following checks are ignored on purpose:
  113. ignore =
  114. builtins = _
  115. # [H106] Don't put vim configuration in source files.
  116. # [H203] Use assertIs(Not)None to check for None.
  117. # [H904] Use ',' instead of '%', String interpolation should be delayed to be handled by the logging code,
  118. # rather than being done at the point of the logging call..
  119. enable-extensions = H106,H203,H904
  120. exclude = .git,.tox,.testrepository,.venv,build,cover,dist,doc,*egg,api-ref/build,*/source/conf.py
  121. [hacking]
  122. import_exceptions =
  123. manila.i18n
  124. local-check-factory = manila.hacking.checks.factory
  125. [testenv:lower-constraints]
  126. basepython = python3
  127. deps =
  128. -c{toxinidir}/lower-constraints.txt
  129. -r{toxinidir}/test-requirements.txt
  130. -r{toxinidir}/requirements.txt