12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- [tox]
- envlist = py{3.7,3.8}-{cherrypy,tornado}-{v3004.2,v3005.1,master},coverage,flake8
- skip_missing_interpreters = true
- skipsdist = false
- [testenv]
- passenv = TOXENV, CI, TRAVIS, TRAVIS_*, CODECOV_*
- deps = -r{toxinidir}/tests/requirements.txt
- v3004.2: salt<3004.2
- v3005.1: salt<3005.1
- master: git+https://github.com/saltstack/salt.git@master#egg=salt
- changedir = {toxinidir}
- setenv = COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
- commands =
- cherrypy: pytest -v --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_cherrypy
- tornado: pytest -v --cov=pepper/ --cov-config=tox.ini --cov-report= {posargs} --salt-api-backend=rest_tornado
- [testenv:flake8]
- deps =
- -r {toxinidir}/tests/requirements.txt
- flake8
- commands = flake8 tests/ pepper/ scripts/pepper setup.py
- [testenv:coverage]
- skip_install = True
- deps =
- coverage >= 7.0.5, < 8
- setenv = COVERAGE_FILE={toxworkdir}/.coverage
- changedir = {toxinidir}
- commands =
- coverage erase
- coverage combine
- coverage report -m
- coverage html
- coverage xml -o {toxworkdir}/coverage.xml
- [testenv:codecov]
- deps = codecov
- skip_install = True
- changedir = {toxinidir}
- commands = codecov --file "{toxworkdir}/coverage.xml"
- [testenv:http]
- skip_install = True
- basepython = python36
- deps =
- changedir = {toxinidir}/htmlcov
- commands = python -m http.server
- [pytest]
- addopts = --showlocals --log-file /tmp/pepper-runtests.log --show-capture=no -ra
- testpaths = tests
- norecursedirs = .git .tox
- usefixtures = pepperconfig
- [flake8]
- max-line-length = 119
- [coverage:run]
- branch = true
- source = pepper/
- omit =
- */.tox/*
- */tests/*
- */setup.py
- [coverage:report]
- skip_covered = True
- show_missing = True
|