forked from saltstack/pepper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
70 lines (60 loc) · 1.68 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
[tox]
envlist = py{27,34,35,36,37,38}-{cherrypy,tornado}-{v2018.3,v2019.2,develop},coverage,flake8
skip_missing_interpreters = true
skipsdist = false
[testenv]
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
deps = -r{toxinidir}/tests/requirements.txt
v2018.3: salt<2018.4
v2019.2: salt<2019.3
develop: git+https://github.com/saltstack/salt.git@develop#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 >= 4.4.1, < 5
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 --no-print-logs -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