tox.ini 1.8 KB

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