forked from fedora-infra/noggin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
81 lines (69 loc) · 1.71 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
78
79
80
81
[tox]
envlist = lint,format,licenses,bandit,covclean,docs,{py36,py37}-{unittest,integration},covreport
isolated_build = true
[testenv]
passenv = HOME
skip_install = true
setenv =
NOGGIN_CONFIG_PATH={toxinidir}/noggin/tests/unit/noggin.cfg
sitepackages = False
commands =
poetry install
unittest: poetry run pytest -vv --cov --cov-append --cov-report= noggin/tests/unit {posargs}
integration: poetry run pytest -vv --no-cov noggin/tests/integration {posargs}
depends =
{py36,py37}: covclean
covreport: py36-unittest,py37-unittest
whitelist_externals = poetry
[testenv:covreport]
basepython = python3.7
deps = coverage
commands =
-coverage html
coverage report -m
[testenv:covclean]
deps = coverage
commands = coverage erase
[testenv:docs]
changedir = docs
deps =
sphinx
sphinxcontrib-napoleon
whitelist_externals =
poetry
mkdir
rm
commands=
mkdir -p _static
rm -rf _build
rm -rf _source
poetry install -q
poetry run sphinx-build -W -b html -d {envtmpdir}/doctrees . _build/html
[testenv:lint]
commands =
poetry install
poetry run flake8 {posargs}
[testenv:format]
commands =
poetry install
poetry run black --check {posargs:.}
[testenv:licenses]
commands =
poetry install
poetry export -f requirements.txt -o /tmp/noggin-requirements.txt
poetry run liccheck -s .license_strategy.ini -r /tmp/noggin-requirements.txt
rm -f /tmp/noggin-requirements.txt
whitelist_externals =
rm
poetry
[testenv:bandit]
commands =
poetry install
poetry run bandit -r noggin/ -x noggin/tests/ -ll
[flake8]
show-source = True
max-line-length = 100
ignore = E203,E231,W503
exclude = .git,.tox,dist,*egg
[pytest]
testpaths = noggin/tests/unit/