123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- [tox]
- envlist = py{3.7,3.8,3.9}-{cherrypy,tornado}-{v3004.2,v3005.1,v3006.0,master},py{3.10}-{cherrypy,tornado}-{v3006.0,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
- v3004.2: jinja2<3.1
- v3005.1: salt==3005.1
- v3006.0: salt==3006.0
- 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
|