2020-04-17 22:56:33 +03:00
|
|
|
[tox]
|
2022-12-21 18:22:21 +03:00
|
|
|
envlist = py39
|
2020-04-17 22:56:33 +03:00
|
|
|
isolated_build = true
|
|
|
|
skipsdist=True
|
|
|
|
|
|
|
|
toxworkdir={toxinidir}/.tox
|
|
|
|
|
|
|
|
[testenv]
|
2024-03-04 18:58:14 +03:00
|
|
|
allowlist_externals =
|
2020-04-17 22:56:33 +03:00
|
|
|
sh
|
|
|
|
docker-compose
|
|
|
|
commands_pre =
|
2023-07-06 13:07:08 +03:00
|
|
|
docker-compose up --detach mysql postgres redis rabbitmq
|
2023-03-22 20:34:23 +03:00
|
|
|
pip install --no-deps -r {toxinidir}/requirements/dev.txt
|
|
|
|
pip install --no-deps -r {toxinidir}/requirements/common.txt
|
2020-04-17 22:56:33 +03:00
|
|
|
commands =
|
2020-08-27 22:10:06 +03:00
|
|
|
{toxinidir}/manage.py check
|
2020-04-17 22:56:33 +03:00
|
|
|
sh -c "SITE_URL=https://treeherder.dev TREEHERDER_DEBUG=False ./manage.py check --deploy --fail-level WARNING"
|
2020-08-27 22:10:06 +03:00
|
|
|
# Running slow tests (DB required)
|
2021-03-26 22:44:55 +03:00
|
|
|
pytest tests/ --runslow
|
2020-04-17 22:56:33 +03:00
|
|
|
commands_post =
|
|
|
|
# This is to deal with running the containers with --detached
|
|
|
|
docker-compose down
|
|
|
|
|
2021-01-06 03:51:23 +03:00
|
|
|
[testenv:linters]
|
|
|
|
commands_pre =
|
2023-03-22 20:34:23 +03:00
|
|
|
pip install --upgrade pip
|
|
|
|
pip install --no-deps -r {toxinidir}/requirements/dev.txt
|
|
|
|
pip install --no-deps -r {toxinidir}/requirements/common.txt
|
2021-01-06 03:51:23 +03:00
|
|
|
commands =
|
|
|
|
pip check
|
2021-01-30 02:47:06 +03:00
|
|
|
# This ensures that we don't loose the ability of installing locally pre-commit checks
|
|
|
|
pre-commit run --all-files
|
2021-01-06 03:51:23 +03:00
|
|
|
commands_post =
|
|
|
|
|
2020-05-15 22:12:35 +03:00
|
|
|
[testenv:docs]
|
|
|
|
commands_pre =
|
2022-08-25 00:23:35 +03:00
|
|
|
pip install --upgrade pip
|
2022-12-21 18:22:21 +03:00
|
|
|
pip install mkdocs mkdocs-material mdx_truly_sane_lists
|
2020-05-15 22:12:35 +03:00
|
|
|
commands =
|
|
|
|
mkdocs build
|
|
|
|
commands_post =
|
|
|
|
|
2020-04-17 22:56:33 +03:00
|
|
|
[testenv:docker]
|
2023-07-13 12:47:21 +03:00
|
|
|
commands_pre =
|
2024-03-04 18:58:14 +03:00
|
|
|
allowlist_externals=
|
2020-04-17 22:56:33 +03:00
|
|
|
docker-compose
|
|
|
|
commands =
|
2022-05-16 21:30:31 +03:00
|
|
|
docker-compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
|
2021-03-23 16:15:32 +03:00
|
|
|
|
2023-07-05 17:43:31 +03:00
|
|
|
[testenv:docker-postgres]
|
2023-07-13 12:47:21 +03:00
|
|
|
commands_pre =
|
2024-03-04 18:58:14 +03:00
|
|
|
allowlist_externals=
|
2023-07-05 17:43:31 +03:00
|
|
|
docker-compose
|
|
|
|
commands =
|
2023-07-06 13:07:08 +03:00
|
|
|
docker-compose run -e TREEHERDER_DEBUG=False -e DATABASE_URL=psql://postgres:mozilla1234@postgres:5432/treeherder backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
|