An orchestrator for managing a collection of Kubernetes Helm charts.
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 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. [tox]
  2. skipsdist = True
  3. minversion = 2.3.1
  4. envlist = py35, pep8, cover, bandit
  5. [testenv]
  6. deps=
  7. -r{toxinidir}/requirements.txt
  8. -r{toxinidir}/test-requirements.txt
  9. passenv=HTTP_PROXY HTTPS_PROXY http_proxy https_proxy NO_PROXY no_proxy
  10. setenv=
  11. VIRTUAL_ENV={envdir}
  12. usedevelop = True
  13. install_command = pip install {opts} {packages}
  14. whitelist_externals =
  15. bash
  16. find
  17. rm
  18. commands =
  19. find . -type f -name "*.pyc" -delete
  20. rm -Rf .testrepository/times.dbm
  21. [testenv:venv]
  22. basepython=python3
  23. commands =
  24. {posargs}
  25. [testenv:py35]
  26. basepython = python3.5
  27. commands =
  28. {[testenv]commands}
  29. stestr run {posargs}
  30. stestr slowest
  31. [testenv:py36]
  32. basepython = python3.6
  33. commands =
  34. {[testenv]commands}
  35. stestr run {posargs}
  36. stestr slowest
  37. [testenv:docs]
  38. basepython = python3
  39. deps = -r{toxinidir}/doc/requirements.txt
  40. commands =
  41. rm -rf doc/build
  42. sphinx-build -W -b html doc/source doc/build/html
  43. [testenv:genconfig]
  44. basepython = python3
  45. commands =
  46. oslo-config-generator --config-file=etc/armada/config-generator.conf
  47. [testenv:genpolicy]
  48. basepython = python3
  49. commands =
  50. oslopolicy-sample-generator --config-file=etc/armada/policy-generator.conf
  51. [testenv:releasenotes]
  52. basepython = python3
  53. deps = -r{toxinidir}/doc/requirements.txt
  54. commands =
  55. rm -rf releasenotes/build
  56. sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
  57. [testenv:pep8]
  58. basepython = python3
  59. deps =
  60. .[bandit]
  61. {[testenv]deps}
  62. commands =
  63. # Whitespace linter (for chart files)
  64. bash {toxinidir}/tools/whitespace-linter.sh
  65. yapf -dr {toxinidir}/armada {toxinidir}/setup.py
  66. flake8 {posargs}
  67. # Run security linter as part of the pep8 gate instead of a separate zuul job.
  68. bandit -r armada -n 5 -x armada/tests/*
  69. [testenv:bandit]
  70. basepython = python3
  71. commands =
  72. bandit -r armada -n 5 -x armada/tests/*
  73. [testenv:cover]
  74. basepython = python3
  75. setenv = {[testenv]setenv}
  76. PYTHON=coverage run --source armada --parallel-mode
  77. commands =
  78. coverage erase
  79. find . -type f -name "*.pyc" -delete
  80. stestr run {posargs}
  81. coverage combine
  82. coverage html -d cover
  83. coverage xml -o cover/coverage.xml
  84. coverage report
  85. [testenv:yapf]
  86. basepython = python3
  87. deps = {[testenv]deps}
  88. commands =
  89. yapf -ir {toxinidir}/armada {toxinidir}/setup.py
  90. [flake8]
  91. filename = *.py
  92. # These are ignored intentionally:
  93. # W504 - line break after binary operator, we cannot have both
  94. # W503 and W504 enabled
  95. ignore = W504
  96. exclude = .git,.tox,dist,*lib/python*,*egg,build,releasenotes,doc/*,hapi,venv