2020-04-17 22:56:33 +03:00
|
|
|
[tox]
|
2022-05-16 21:30:31 +03:00
|
|
|
envlist = py38
|
2020-04-17 22:56:33 +03:00
|
|
|
isolated_build = true
|
|
|
|
skipsdist=True
|
|
|
|
|
|
|
|
toxworkdir={toxinidir}/.tox
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
whitelist_externals =
|
|
|
|
sh
|
|
|
|
docker-compose
|
|
|
|
commands_pre =
|
|
|
|
docker-compose up --detach mysql redis rabbitmq
|
|
|
|
pip install -r {toxinidir}/requirements/dev.txt
|
|
|
|
pip install -r {toxinidir}/requirements/common.txt
|
|
|
|
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 =
|
|
|
|
pip install -r {toxinidir}/requirements/dev.txt
|
|
|
|
pip install -r {toxinidir}/requirements/common.txt
|
|
|
|
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 =
|
|
|
|
pip install poetry
|
|
|
|
poetry install --extras "docs"
|
|
|
|
commands =
|
|
|
|
mkdocs build
|
|
|
|
commands_post =
|
|
|
|
|
2020-04-17 22:56:33 +03:00
|
|
|
[testenv:docker]
|
|
|
|
whitelist_externals=
|
|
|
|
docker-compose
|
2020-08-27 22:10:06 +03:00
|
|
|
commands_pre =
|
2020-04-17 22:56:33 +03:00
|
|
|
docker-compose build
|
|
|
|
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
|
|
|
|
|
|
|
[flake8]
|
|
|
|
per-file-ignores = treeherder/model/models.py:E402
|