-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
51 lines (45 loc) · 1.38 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
# Copyright 2022 Canonical Ltd.
# See LICENSE file for licensing details.
[tox]
no_package = True
skip_missing_interpreters = True
env_list = lint, unit
[vars]
src_path = {toxinidir}/kafka_app/
tst_path = {toxinidir}/tests/
all_path = {[vars]src_path} {[vars]tst_path}
[testenv]
allowlist_externals =
/bin/bash
poetry
set_env =
PYTHONPATH = {tox_root}/lib:{[vars]src_path}
PYTHONBREAKPOINT=ipdb.set_trace
PY_COLORS=1
pass_env =
PYTHONPATH
CHARM_BUILD_DIR
MODEL_SETTINGS
[testenv:fmt]
description = Apply coding style standards to code
commands =
poetry install --only fmt --sync --no-cache
poetry run isort {[vars]all_path}
poetry run black {[vars]all_path}
[testenv:lint]
description = Check code against coding style standards
commands =
poetry install --only fmt,lint --sync --no-cache
poetry run codespell {[vars]all_path} pyproject.toml
poetry run flake8 {[vars]all_path}
poetry run isort --check-only --diff {[vars]all_path}
poetry run black --check --diff {[vars]all_path}
poetry run mypy --install-types --non-interactive {[vars]all_path} --exclude {[vars]int_resources_path}
[testenv:integration]
description = Run integration tests
setenv =
IE_TEST=1
commands =
poetry install --with integration --sync --no-cache
poetry export -f requirements.txt -o requirements.txt
poetry run pytest -vv tests/integration