-
Notifications
You must be signed in to change notification settings - Fork 15
/
tox.ini
81 lines (74 loc) · 1.7 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
# This is a template `tox.ini` file for ops charms
# This file is managed by bootstack-charms-spec and should not be modified
# within individual charm repos. https://launchpad.net/bootstack-charms-spec
[tox]
skipsdist=True
envlist = lint, unit, func
[testenv]
basepython = python3
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/lib/:{toxinidir}/src/
passenv =
HOME
PATH
CHARM_*
PYTEST_KEEP_MODEL
PYTEST_CLOUD_NAME
PYTEST_CLOUD_REGION
PYTEST_MODEL
MODEL_SETTINGS
HTTP_PROXY
HTTPS_PROXY
NO_PROXY
SNAP_HTTP_PROXY
SNAP_HTTPS_PROXY
OS_*
[testenv:lint]
commands =
pflake8
pylint --recursive=y .
mypy --install-types --non-interactive .
black --check --diff --color .
isort --check --diff --color .
deps =
black
pylint
mypy
flake8
pyproject-flake8
flake8-docstrings
pep8-naming
flake8-colors
colorama
isort
{[testenv:unit]deps}
{[testenv:func]deps}
[testenv:reformat]
commands =
black .
isort .
deps = {[testenv:lint]deps}
[testenv:unit]
commands = pytest {toxinidir}/tests/unit \
{posargs:-v --cov --cov-report=term-missing --cov-report=html --cov-report=xml}
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/tests/unit/requirements.txt
pytest
pytest-cov
[testenv:func]
commands = pytest {toxinidir}/tests/functional {posargs:-v}
deps =
-r {toxinidir}/tests/functional/requirements.txt
passenv =
REDFISH_USERNAME
REDFISH_PASSWORD
[testenv:integration]
description = Run integration tests with COS
deps =
-r {toxinidir}/tests/integration/requirements.txt
passenv =
K8S_CONTROLLER
LXD_CONTROLLER
commands =
pytest {toxinidir}/tests/integration {posargs:-s -vv --log-cli-level=INFO}