-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
72 lines (65 loc) · 1.42 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
[tox]
envlist = lint, static, test
isolated_build = True
[vars]
src_path = {toxinidir}/cos_alerter
tst_path = {toxinidir}/tests
all_path = {[vars]src_path} {[vars]tst_path}
[testenv:fmt]
description = Apply coding style standards to code
skip_install = True
deps =
black
ruff
commands =
ruff --fix {[vars]all_path}
black {[vars]all_path}
[testenv:lint]
description = Check code against coding style standards
skip_install = True
deps =
black
ruff
codespell
commands =
codespell --skip .git --skip .tox --skip build --skip venv
ruff {[vars]all_path}
black --check --diff {[vars]all_path}
[testenv:static]
description = Run static analysis checks
deps =
types-pyyaml
types-waitress
pyright
commands =
pyright
[testenv:test]
description = Run unit tests
deps =
coverage[toml]
freezegun
pyfakefs
pytest
werkzeug
commands =
coverage run --source {[vars]src_path} -m pytest -m "not slow" -v --log-cli-level=INFO {[vars]tst_path}
[testenv:slow-tests]
description = Run unit tests
depends = test
deps =
coverage[toml]
freezegun
pyfakefs
pytest
commands =
coverage run -a --source {[vars]src_path} -m pytest -m slow -v --log-cli-level=INFO {[vars]tst_path}
[testenv:coverage]
skip_install = True
description = Check the code coverage
depends =
test
slow-tests
deps =
coverage
commands =
coverage report --show-missing --fail-under 100