-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
77 lines (68 loc) · 1.69 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
73
74
75
76
77
[tox]
minversion = 1.6
skipsdist = True
envlist =
clean,
stylecheck,
bandit,
py310,
report
[pytest]
timeout = 160
env =
FLASK_ENV=production
[flake8]
per-file-ignores =
# line too long
./migrations/versions/*: F401,E122,E128,E501,W291,
# Environment defaults ----------------------------------------------
[testenv]
usedevelop = True
skip_install = True
deps =
-r{toxinidir}/requirements/prod.txt
-r{toxinidir}/requirements/dev.txt
commands =
pytest \
--basetemp="{envtmpdir}" \
--confcutdir=".." \
--cov="backend" \
--cov-append \
--cov-report=term-missing \
{posargs}
# Environment for cleaning previous coverage data -------------------
[testenv:clean]
deps = coverage
commands = coverage erase
# Environment to produce coverage results ---------------------------
# Collects information from prev env using --cov-append
[testenv:report]
deps = coverage
commands =
coverage report
coverage html
# Environment to check python style ---------------------------------
[testenv:stylecheck]
deps = flake8
envdir = {toxworkdir}/shared
commands =
flake8 \
--format=pylint\
--output-file=./tmp/flake8.log
; --extend-ignore=
# Environment to test functional requirements pass ------------------
[testenv:functional]
envdir = {toxworkdir}/shared
commands =
pytest \
--basetemp="{envtmpdir}" \
--confcutdir=".." \
--cov="backend" \
--cov-report=term-missing \
--cov-report=xml:./tmp/be-coverage.xml \
tests
# Environment to check vulnerabilities ------------------------------
[testenv:bandit]
deps = bandit
envdir = {toxworkdir}/shared
commands = bandit -r backend -x tests -f xml -o ./tmp/bandit.xml