-
Notifications
You must be signed in to change notification settings - Fork 6
/
tox.ini
65 lines (58 loc) · 1.19 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
[tox]
envlist = py37,py38,linters
[testenv]
deps =
-r requirements-test.txt
coverage
setenv =
COVERAGE_FILE = test-reports/{envname}/.coverage
PYTEST_ADDOPTS = --junitxml=test-reports/{envname}/junit.xml -vv
commands =
coverage run --source swag_api --parallel-mode -m pytest {posargs}
coverage combine
coverage report -m
coverage html -d test-reports/{envname}/coverage-html
coverage xml -o test-reports/{envname}/coverage.xml
[testenv:linters]
basepython = python3
usedevelop = true
deps =
{[testenv:flake8]deps}
{[testenv:bandit]deps}
commands =
{[testenv:flake8]commands}
{[testenv:bandit]commands}
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8
flake8-import-order>=0.9
commands =
flake8 swag_api setup.py
[testenv:bandit]
basepython = python3
skip_install = true
deps =
bandit
commands =
bandit --ini tox.ini -r swag_api
[bandit]
skips = B101,B104,B105
[flake8]
ignore = E501,I100
exclude =
*.egg-info,
*.pyc,
.cache,
.coverage.*,
.gradle,
.tox,
build,
dist,
htmlcov.*
max-complexity = 10
import-order-style = google
application-import-names = flake8
[pytest]
norecursedirs=.*