-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathtox.ini
57 lines (50 loc) · 1.29 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
[flake8]
max-line-length = 120
[tox]
skipsdist = True
envlist = lint,unit
[testenv]
basepython = python3
setenv =
PYTHONPATH={toxinidir}:{toxinidir}/lib
[testenv:format]
deps =
black
commands =
black {toxinidir}/actions {toxinidir}/reactive {toxinidir}/lib {toxinidir}/tests/integration {toxinidir}/tests/unit
[testenv:unit]
deps =
pyyaml
jinja2
pytest
pytest-mock
pytest-cov
charms.unit_test
commands =
pytest --cov-report term-missing \
--cov lib --cov-fail-under 75 \
--tb native -s {posargs} {toxinidir}/tests/unit
[testenv:integration]
deps =
pytest-operator
commands =
pytest -v \
-s \
--tb native \
--log-cli-level=INFO \
{posargs} \
{toxinidir}/tests/integration
[testenv:lint]
deps =
black
flake8
envdir = {toxworkdir}/py3
commands =
flake8 {toxinidir}/reactive {toxinidir}/lib {toxinidir}/tests/integration {toxinidir}/tests/unit
black --check --diff {toxinidir}/actions {toxinidir}/reactive {toxinidir}/lib {toxinidir}/tests/integration {toxinidir}/tests/unit
[testenv:validate-wheelhouse]
deps =
git+https://github.com/juju/charm-tools.git
path<17
allowlist_externals = {toxinidir}/tests/validate-wheelhouse.sh
commands = {toxinidir}/tests/validate-wheelhouse.sh