tox.ini 1.7 KB

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