-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtox.ini
More file actions
132 lines (119 loc) · 3.04 KB
/
tox.ini
File metadata and controls
132 lines (119 loc) · 3.04 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Copyright 2025 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
no_package = True
skip_missing_interpreters = True
env_list = format, lint, static, actions-lint, actions-static, actions-unit
min_version = 4.0.0
[vars]
tests_path = {tox_root}/charms/tests
actions_path = {tox_root}/actions
[testenv]
setenv =
PYTHONPATH = {[vars]tests_path}
PYTHONBREAKPOINT=pdb.set_trace
PY_COLORS=1
pass_env =
PYTHONPATH
CHARM_BUILD_DIR
MODEL_SETTINGS
[testenv:garm-integration]
pass_env =
PYTEST_ADDOPTS
description = Run GARM charm integration tests
deps =
pytest
pytest-operator
-r {[vars]tests_path}/integration/requirements.txt
commands =
pytest -v \
-s \
--tb native \
--log-cli-level=INFO \
{[vars]tests_path}/integration/test_garm.py \
{posargs}
[testenv:webhook-gateway-integration]
pass_env =
PYTEST_ADDOPTS
description = Run webhook gateway charm integration tests
deps =
pytest
pytest-operator
-r {[vars]tests_path}/integration/requirements.txt
commands =
pytest -v \
-s \
--tb native \
--log-cli-level=INFO \
{[vars]tests_path}/integration/test_webhook_gateway.py \
{posargs}
[testenv:planner-integration]
pass_env =
PYTEST_ADDOPTS
description = Run planner charm integration tests
deps =
pytest
pytest-operator
-r {[vars]tests_path}/integration/requirements.txt
commands =
pytest -v \
-s \
--tb native \
--log-cli-level=INFO \
{[vars]tests_path}/integration/test_planner.py \
{posargs}
[testenv:garm-configurator-integration]
pass_env =
PYTEST_ADDOPTS
description = Run garm-configurator charm integration tests
deps =
pytest
pytest-operator
-r {[vars]tests_path}/integration/requirements.txt
commands =
pytest -v \
-s \
--tb native \
--log-cli-level=INFO \
{[vars]tests_path}/integration/test_garm_configurator.py \
{posargs}
[testenv:charms-integration]
pass_env =
PYTEST_ADDOPTS
description = Run combined charm integration tests
deps =
pytest
pytest-operator
-r {[vars]tests_path}/integration/requirements.txt
commands =
pytest -v \
-s \
--tb native \
--log-cli-level=INFO \
{[vars]tests_path}/integration \
{posargs}
[testenv:actions-lint]
description = Run formatting and lint checks for Python code under actions/
deps =
black
ruff
commands =
black --check {[vars]actions_path}
ruff check {[vars]actions_path}
[testenv:actions-static]
description = Run static analysis for Python code under actions/
deps =
mypy
pylint
bandit
pytest
commands =
mypy {[vars]actions_path}
pylint {[vars]actions_path}
bandit -q -r {[vars]actions_path} -x {[vars]actions_path}/enable-log-forwarding/tests
[testenv:actions-unit]
description = Run unit tests for Python code under actions/
deps =
pytest
commands =
pytest -v -s {[vars]actions_path}