-
Notifications
You must be signed in to change notification settings - Fork 35
/
tox.ini
81 lines (72 loc) · 1.52 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
[tox]
envlist =
py37,
py38,
py39,
py310,
py311
isolated_build = true
[testenv]
setenv =
ETCD_HOST = 127.0.0.1
KUBECONFIG = {toxinidir}/kubeconfig.yaml
MEMCACHED_HOST = 127.0.0.1
REDIS_HOST = 127.0.0.1
commands =
poetry install --all-extras --verbose
poetry run pytest \
--cov {toxinidir}/sherlock \
--cov-report term \
--cov-report xml:{toxinidir}/coverage.xml \
{toxinidir}/tests
docker =
etcd
redis
memcached
kubernetes
whitelist_externals = poetry
[tox:.package]
basepython = python3
[docker:etcd]
image = quay.io/coreos/etcd
environment =
ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379,http://0.0.0.0:4001
ETCD_ADVERTISE_CLIENT_URLS=http://0.0.0.0:2379,http://0.0.0.0:4001
ports =
2379:2379/tcp
4001:4001/tcp
[docker:redis]
image = redis
ports = 6379:6379/tcp
[docker:memcached]
image = memcached
ports = 11211:11211/tcp
[docker:kubernetes]
image = rancher/k3s
command = server
privileged = true
environment =
K3S_TOKEN=13521885930989
K3S_KUBECONFIG_OUTPUT=/output/kubeconfig.yaml
K3S_KUBECONFIG_MODE=666
volumes =
bind:rw:{toxinidir}:/output
ports = 6443:6443/tcp
healthcheck_cmd = kubectl get --raw='/readyz?verbose'
healthcheck_timeout = 120
healthcheck_retries = 999
healthcheck_interval = 5
healthcheck_start_period = 0
[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
fail_on_no_env = True
[flake8]
max-line-length = 88
extend-ignore = "E203"
[pycodestyle]
max-line-length = 88