1
0

tox.ini 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. [tox]
  2. envlist = py{3.7,3.8}-{cherrypy,tornado}-{v3004.2,v3005.1,master},coverage,flake8
  3. skip_missing_interpreters = true
  4. skipsdist = false
  5. [testenv]
  6. passenv = TOXENV, CI, TRAVIS, TRAVIS_*, CODECOV_*
  7. deps = -r{toxinidir}/tests/requirements.txt
  8. v3004.2: salt<3004.2
  9. v3004.2: jinja2<3.1
  10. v3005.1: salt<3005.1
  11. py3.7-{cherrypy,tornado}-{v3004.2,v3005.1}: importlib-metadata<5.0.0
  12. master: git+https://github.com/saltstack/salt.git@master#egg=salt
  13. changedir = {toxinidir}
  14. setenv = COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
  15. commands =
  16. cherrypy: pytest -v --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_cherrypy
  17. tornado: pytest -v --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_tornado
  18. [testenv:flake8]
  19. deps =
  20. -r {toxinidir}/tests/requirements.txt
  21. flake8
  22. commands = flake8 tests/ pepper/ scripts/pepper setup.py
  23. [testenv:coverage]
  24. skip_install = True
  25. deps =
  26. coverage >= 7.0.5, < 8
  27. setenv = COVERAGE_FILE={toxworkdir}/.coverage
  28. changedir = {toxinidir}
  29. commands =
  30. coverage erase
  31. coverage combine
  32. coverage report -m
  33. coverage html
  34. coverage xml -o {toxworkdir}/coverage.xml
  35. [testenv:codecov]
  36. deps = codecov
  37. skip_install = True
  38. changedir = {toxinidir}
  39. commands = codecov --file "{toxworkdir}/coverage.xml"
  40. [testenv:http]
  41. skip_install = True
  42. basepython = python36
  43. deps =
  44. changedir = {toxinidir}/htmlcov
  45. commands = python -m http.server
  46. [pytest]
  47. addopts = --showlocals --log-file /tmp/pepper-runtests.log --show-capture=no -ra
  48. testpaths = tests
  49. norecursedirs = .git .tox
  50. usefixtures = pepperconfig
  51. [flake8]
  52. max-line-length = 119
  53. [coverage:run]
  54. branch = true
  55. source = pepper/
  56. omit =
  57. */.tox/*
  58. */tests/*
  59. */setup.py
  60. [coverage:report]
  61. skip_covered = True
  62. show_missing = True