-
Notifications
You must be signed in to change notification settings - Fork 28
/
tox.ini
51 lines (48 loc) · 1.3 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
[tox]
envlist =
{py39,py310,py311,py312,py313}-{redis,redis4,diskcache,integration}
coverage
skip_missing_interpreters = true
[testenv]
install_command =
pip install {opts} {packages} --isolated
setenv =
PYTHONPATH = {toxinidir}/tests
COVERAGE_FILE = {toxworkdir}/.coverage.{envname}
MARKER = not redis and not integration and not diskcache
{py}-redis: MARKER = redis and not diskcache
{py}-redis4: MARKER = redis and not diskcache
{py}-diskcache: MARKER = diskcache and not redis
{py}-integration: MARKER = integration
deps =
.[tests]
{py}-redis4: redis==4.6.0
{py}-integration: aiohttp
{py}-integration: fastapi
{py}-integration: httpx
{py}-integration: SQLAlchemy
{py}-integration: prometheus-client
extras =
{py}-redis: redis,speedup
{py}-diskcache: diskcache
{py}-integration: redis,speedup,diskcache,dill
commands =
pytest --cov --cov-fail-under=0 --reruns 5 --reruns-delay 1 --exitfirst \
-m "{env:MARKER}" \
{posargs:.}
[testenv:coverage]
skip_install = True
setenv =
COVERAGE_FILE = {toxworkdir}/.coverage
deps =
coverage
commands =
coverage combine
coverage report
coverage xml -o {toxworkdir}/coverage.xml
depends =
{py}
{py}-redis
{py}-redis4
{py}-diskcache
{py}-integration