-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
81 lines (72 loc) · 1.78 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]
skipsdist = True
envlist = lint, unit
sitepackages = False
skip_missing_interpreters = False
[vars]
tst_path = {toxinidir}/tests/
all_path = {[vars]tst_path}
[testenv]
basepython = python3
[testenv:lint]
allowlist_externals = tox
deps =
black
flake8-docstrings
flake8-builtins
pyproject-flake8
pep8-naming
isort
codespell
commands =
# uncomment the following line if this charm owns a lib
codespell {[vars]all_path}
# pflake8 wrapper supports config from pyproject.toml
pflake8 {[vars]all_path}
isort --check-only --diff {[vars]all_path}
black --check --diff {[vars]all_path}
tox -c {toxinidir}/charms/volcano-admission -e lint
tox -c {toxinidir}/charms/volcano-controllers -e lint
tox -c {toxinidir}/charms/volcano-scheduler -e lint
[testenv:unit]
allowlist_externals = tox
commands =
tox -c {toxinidir}/charms/volcano-admission -e unit
tox -c {toxinidir}/charms/volcano-controllers -e unit
tox -c {toxinidir}/charms/volcano-scheduler -e unit
[testenv:format]
allowlist_externals = tox
deps =
black
isort
commands =
isort {[vars]all_path}
black {[vars]all_path}
tox -c {toxinidir}/charms/volcano-admission -e format
tox -c {toxinidir}/charms/volcano-controllers -e format
tox -c {toxinidir}/charms/volcano-scheduler -e format
[testenv:integration]
setenv =
PYTHONBREAKPOINT=ipdb.set_trace
PYTHONPATH={toxinidir}
passenv =
HOME
deps =
pyyaml
pytest
pytest-operator
pytest-timeout
aiohttp
ipdb
juju
lightkube
commands =
pytest --tb native \
--show-capture=no \
--asyncio-mode=auto \
--log-cli-level=INFO \
-s {posargs} \
{toxinidir}/tests/integration
[flake8]
max-line-length = 88
max-complexity = 10