-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtox.ini
56 lines (46 loc) · 1.24 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
[tox]
envlist = py39, py312
isolated_build = true
[testenv]
commands = pytest -v {posargs}
allowlist_externals = sh, poetry
skip_install = true
commands_pre =
poetry run pip -V
poetry install --with dev,test
[testenv:static]
commands =
black --check .
sh -c 'pylint ubi_manifest; test $(( $? & (1|2|4|32) )) = 0'
[testenv:cov]
usedevelop = true
commands =
pytest --cov-report=html --cov-report=xml --cov=ubi_manifest --cov-fail-under=100 {posargs}
[testenv:docs]
use_develop = true
commands =
poetry install --with docs
sphinx-build -M html docs docs/_build -W
python scripts/gen-openapi
[testenv:mypy]
deps = types-redis
commands =
sh -c 'mypy ubi_manifest --strict'
[pytest]
testpaths = tests
[testenv:pip-compile]
deps = pip-tools
basepython = python3.9
skip_install = true
skipsdist = true
commands =
pip-compile -U --generate-hashes requirements-dev.in
pip-compile -U --generate-hashes test-requirements.in
[testenv:bandit-exitzero]
commands=
# Skip B101 low severity assert warnings in the tests directory
bandit -r ./tests --severity-level low --exit-zero --skip B101
bandit -r . -l --exclude './.tox,./tests' --exit-zero
[testenv:bandit]
commands=
bandit -r . -ll --exclude './.tox' --confidence-level medium