forked from valkey-io/valkey-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
58 lines (52 loc) · 1.72 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
[tox]
env_list = lint, standalone-{uvloop,nouvloop}-protocol{2,3}
[testenv:doc]
description = Build documentation
deps = -rdocs/requirements.txt
commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
[testenv:docker]
description = Set up development environment
allowlist_externals = docker
commands =
docker compose --profile all up -d
[testenv:lint]
description = Run linters
deps =
black
flake8
flynt
isort
vulture
commands =
black --target-version py37 --check --diff tests valkey
flake8 tests valkey
isort --check-only --diff tests valkey
vulture valkey whitelist.py --min-confidence 80
flynt --fail-on-change --dry-run tests valkey
[testenv:standalone-{uvloop,nouvloop}-protocol{2,3}]
description = Run standalone tests
deps =
pytest
-rdev_requirements.txt
passenv = CI
setenv =
uvloop: VALKEY_UVLOOP=uvloop
nouvloop: VALKEY_UVLOOP=no-uvloop
protocol2: VALKEY_PROTOCOL=2
protocol3: VALKEY_PROTOCOL=3
commands =
pytest --protocol={env:VALKEY_PROTOCOL} --cov=./ --cov-report=xml:coverage_valkey.xml -W always -m 'not onlycluster' --junit-xml=standalone-{env:VALKEY_UVLOOP}-results.xml {posargs:tests}
[testenv:cluster-{uvloop,nouvloop}-protocol{2,3}]
description = Run cluster tests
deps =
pytest
-rdev_requirements.txt
passenv = CI
setenv =
uvloop: VALKEY_UVLOOP=uvloop
nouvloop: VALKEY_UVLOOP=no-uvloop
protocol2: VALKEY_PROTOCOL=2
protocol3: VALKEY_PROTOCOL=3
commands =
pytest --protocol={env:VALKEY_PROTOCOL} --cov=./ --cov-report=xml:coverage_cluster.xml -W always -m 'not onlynoncluster and not valkeymod' --valkey-url=valkey://localhost:16379/0 --junit-xml=cluster-{env:VALKEY_UVLOOP}-results.xml {posargs:tests}