tox.ini 1.7 KB

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