Debian Codegraph @

tox.ini

raw
1 [tox]
2 requires =
3 tox-gh-actions
4 envlist =
5 {3.9,3.10,3.11,3.12,3.13,3.14,pypy3}-unit
6 {3.9,3.10,3.11,3.12,3.13,3.14,pypy3}-integration-{rabbitmq_redis,rabbitmq,redis,dynamodb,azureblockblob,cache,cassandra,elasticsearch,docker}
7 {3.9,3.10,3.11,3.12,3.13,3.14,pypy3}-smoke
8
9 flake8
10 apicheck
11 configcheck
12 bandit
13
14
15 [gh-actions]
16 python =
17 3.9: 3.9-unit
18 3.10: 3.10-unit
19 3.11: 3.11-unit
20 3.12: 3.12-unit
21 3.13: 3.13-unit
22 3.14: 3.14-unit
23 pypy-3: pypy3-unit
24
25 [testenv]
26 sitepackages = False
27 recreate = False
28 passenv =
29 AZUREBLOCKBLOB_URL
30
31 deps=
32 -r{toxinidir}/requirements/test.txt
33 -r{toxinidir}/requirements/pkgutils.txt
34
35 3.9,3.10,3.11,3.12,3.13,3.14: -r{toxinidir}/requirements/test-ci-default.txt
36 3.9,3.10,3.11,3.12,3.13,3.14: -r{toxinidir}/requirements/docs.txt
37 pypy3: -r{toxinidir}/requirements/test-ci-default.txt
38
39 integration: -r{toxinidir}/requirements/test-integration.txt
40 smoke: pytest-xdist>=3.5
41
42 linkcheck,apicheck,configcheck: -r{toxinidir}/requirements/docs.txt
43 lint: pre-commit
44 bandit: bandit
45
46 install_command = python -I -m pip install {opts} {packages} --build-constraint {toxinidir}/requirements/constraints.txt
47
48 commands =
49 unit: coverage run --source=celery -m pytest -vv --maxfail=10 --capture=no -v --junitxml=junit.xml -o junit_family=legacy {posargs}
50 unit: coverage xml
51 unit: coverage report
52 integration: pytest -xsvv t/integration {posargs}
53 smoke: pytest -xsvv t/smoke --reruns 5 --reruns-delay 10 {posargs}
54 setenv =
55 PIP_EXTRA_INDEX_URL=https://celery.github.io/celery-wheelhouse/repo/simple/
56 BOTO_CONFIG = /dev/null
57 WORKER_LOGLEVEL = INFO
58 PYTHONIOENCODING = UTF-8
59 PYTHONUNBUFFERED = 1
60 PYTHONDONTWRITEBYTECODE = 1
61
62 cache: TEST_BROKER=redis://
63 cache: TEST_BACKEND=cache+pylibmc://
64
65 cassandra: TEST_BROKER=redis://
66 cassandra: TEST_BACKEND=cassandra://
67
68 elasticsearch: TEST_BROKER=redis://
69 elasticsearch: TEST_BACKEND=elasticsearch://@localhost:9200
70
71 rabbitmq: TEST_BROKER=pyamqp://
72 rabbitmq: TEST_BACKEND=rpc
73
74 redis: TEST_BROKER=redis://
75 redis: TEST_BACKEND=redis://
76
77 rabbitmq_redis: TEST_BROKER=pyamqp://
78 rabbitmq_redis: TEST_BACKEND=redis://
79
80 docker: TEST_BROKER=pyamqp://rabbit:5672
81 docker: TEST_BACKEND=redis://redis
82
83 dynamodb: TEST_BROKER=redis://
84 dynamodb: TEST_BACKEND=dynamodb://@localhost:8000
85 dynamodb: AWS_ACCESS_KEY_ID=test_aws_key_id
86 dynamodb: AWS_SECRET_ACCESS_KEY=test_aws_secret_key
87
88 azureblockblob: TEST_BROKER=redis://
89 azureblockblob: TEST_BACKEND="azureblockblob://DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"
90
91 basepython =
92 3.9: python3.9
93 3.10: python3.10
94 3.11: python3.11
95 3.12: python3.12
96 3.13: python3.13
97 3.14: python3.14
98 pypy3: pypy3
99 mypy: python3.13
100 lint,apicheck,linkcheck,configcheck,bandit: python3.13
101 usedevelop = True
102
103 [testenv:mypy]
104 commands = python -m mypy --config-file pyproject.toml
105
106 [testenv:apicheck]
107 setenv =
108 PYTHONHASHSEED = 100
109 commands =
110 sphinx-build -j2 -b apicheck -d {envtmpdir}/doctrees docs docs/_build/apicheck
111
112 [testenv:configcheck]
113 commands =
114 sphinx-build -j2 -b configcheck -d {envtmpdir}/doctrees docs docs/_build/configcheck
115
116 [testenv:linkcheck]
117 commands =
118 sphinx-build -j2 -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
119
120 [testenv:bandit]
121 commands =
122 bandit -b bandit.json -r celery/
123
124 [testenv:lint]
125 commands =
126 pre-commit {posargs:run --all-files --show-diff-on-failure}
127
128 [testenv:clean]
129 deps = cleanpy
130 allowlist_externals = bash, make, rm
131 commands =
132 bash -c 'files=$(find . -name "*.coverage*" -type f); if [ -n "$files" ]; then echo "Removed coverage file(s):"; echo "$files" | tr " " "\n"; rm $files; fi'
133 bash -c 'containers=$(docker ps -aq --filter label=creator=pytest-docker-tools); if [ -n "$containers" ]; then echo "Removed Docker container(s):"; docker rm -f $containers; fi'
134 bash -c 'networks=$(docker network ls --filter name=pytest- -q); if [ -n "$networks" ]; then echo "Removed Docker network(s):"; docker network rm $networks; fi'
135 bash -c 'volumes=$(docker volume ls --filter name=pytest- -q); if [ -n "$volumes" ]; then echo "Removed Docker volume(s):"; docker volume rm $volumes; fi'
136 python -m cleanpy .
137 make clean
138 rm -f test.db statefilename.db 86