-
Notifications
You must be signed in to change notification settings - Fork 383
Expand file tree
/
Copy pathtox.ini
More file actions
78 lines (69 loc) · 2.56 KB
/
tox.ini
File metadata and controls
78 lines (69 loc) · 2.56 KB
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
[tox]
envlist = py313
isolated_build = true
skipsdist=True
toxworkdir={toxinidir}/.tox
[testenv]
allowlist_externals =
sh
docker
commands_pre =
docker compose up --detach postgres redis rabbitmq
pip install --no-deps -r {toxinidir}/requirements/dev.txt
pip install --no-deps -r {toxinidir}/requirements/common.txt
commands =
{toxinidir}/manage.py check
sh -c "SITE_URL=https://treeherder.dev TREEHERDER_DEBUG=False ./manage.py check --deploy --fail-level WARNING"
# Running slow tests (DB required)
pytest tests/ --runslow
commands_post =
# This is to deal with running the containers with --detached
docker compose down
[testenv:linters]
commands_pre =
pip install --upgrade pip
pip install --no-deps -r {toxinidir}/requirements/dev.txt
pip install --no-deps -r {toxinidir}/requirements/common.txt
allowlist_externals =
bash
commands =
# mozdetect declares pyqt5 as a dependency but PyQt5 has no Python 3.13 wheels
# and Treeherder doesn't use PyQt5. Filter out this known incompatibility,
# but fail if any OTHER broken requirements exist.
bash -c "output=$(pip check 2>&1 | grep -v 'mozdetect .* requires pyqt5' | grep -v '^No broken requirements found\.$'); [ -z \"$output\" ] || (echo \"$output\" && exit 1)"
# This ensures that we don't loose the ability of installing locally pre-commit checks
pre-commit run --all-files
commands_post =
[testenv:docs]
commands_pre =
pip install --upgrade pip
pip install mkdocs mkdocs-material mdx_truly_sane_lists
commands =
mkdocs build
commands_post =
[testenv:docker-general]
commands_pre =
allowlist_externals=
docker
commands =
docker compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml -m 'not (perf or frontend)' --runslow -p no:unraisableexception"
[testenv:docker-perf]
commands_pre =
allowlist_externals=
docker
commands =
docker compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml -m 'perf and not telemetry_alerting' --runslow -p no:unraisableexception"
[testenv:docker-telemetry]
commands_pre =
allowlist_externals=
docker
commands =
docker compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml -m telemetry_alerting --runslow -p no:unraisableexception"
[testenv:docker-frontend]
commands_pre =
allowlist_externals=
docker
commands =
docker compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml -m frontend --runslow -p no:unraisableexception"
[flake8]
per-file-ignores = treeherder/model/models.py:E402