-
Notifications
You must be signed in to change notification settings - Fork 12
/
tox.ini
62 lines (56 loc) · 1.4 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
[flake8]
max-line-length = 120
ignore = D100, W503
[tox]
skipsdist = True
envlist = lint,unit
[testenv]
setenv =
PY_COLORS=1
[testenv:unit]
basepython = python3
setenv =
PYTHONPATH={toxinidir}:{toxinidir}/lib
deps =
pyyaml
pytest
pytest-cov
ipdb
jinja2
git+https://github.com/juju-solutions/charms.unit_test/#egg=charms.unit_test
commands =
pytest \
--cov-report term-missing \
--cov charms.layer.containerd --cov-fail-under 100 \
--cov reactive.containerd --cov-fail-under 45 \
--cov-report=html:{toxinidir}/report/unit/coverage-html \
-vv \
--tb native -s {posargs} {toxinidir}/tests/unit
[testenv:lint]
deps =
flake8
flake8-docstrings
black
commands =
flake8 {toxinidir}/reactive {toxinidir}/lib {toxinidir}/tests
black --check --line-length=120 {toxinidir}/actions {toxinidir}/reactive {toxinidir}/lib {toxinidir}/tests
[testenv:format]
envdir = {toxworkdir}/lint
deps = black
commands =
black --line-length=120 {toxinidir}/actions {toxinidir}/reactive {toxinidir}/lib {toxinidir}/tests
[testenv:integration]
# pinning juju until 3.0+ regressions are fixed
deps =
pytest
pytest-operator
ipdb
toml
tenacity
commands =
pytest --tb native \
--show-capture=no \
--asyncio-mode=auto \
--log-cli-level=INFO \
-s {posargs} \
{toxinidir}/tests/integration