-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
64 lines (56 loc) · 1.27 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
[tox]
envlist = flake8,pyright,pylint,py39,py310,py311,py312,py313
[gh]
python =
3.9 = pyright, py39
3.10 = flake8, py310
3.11 = pylint, py311
3.12 = py312
3.13 = py313
[testenv]
deps = pytest
allowlist_externals = /bin/bash
# if docker is available then choose it randomly
commands =
/bin/bash -c 'if [ -x /usr/bin/docker -a $(( $RANDOM % 2 )) -eq 0 ]; then \
echo Force run tests with docker; \
export YBOX_CONTAINER_MANAGER=/usr/bin/docker; \
elif [ -x /usr/bin/podman ]; then \
echo Running tests with podman; \
else \
echo Running tests with docker; \
fi; \
pytest {posargs}'
[testenv:flake8]
deps =
flake8
-rrequirements-flake8.txt
commands = flake8 src tests
[testenv:pyright]
deps =
pyright
pytest
commands = pyright
[testenv:pylint]
deps =
pylint
-rrequirements.txt
setenv =
PYTHONPATH = ./src:./tests
commands =
pylint -j8 src/ybox tests
pylint -j8 src/ybox/conf/distros/*/*.py
[pytest]
pythonpath = src
testpaths = tests
[flake8]
exclude = .git,.venv,.tox,__pycache__,src/ybox/conf,src/ybox/schema
max_line_length = 99
ignore = W504,A005
extend-select = B90
extend-ignore = B905,B907
show-source = true
[coverage:run]
include =
src/ybox/**
disable_warnings = include-ignored