-
Notifications
You must be signed in to change notification settings - Fork 125
/
tox.ini
72 lines (62 loc) · 1.78 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[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