treeherder/tox.ini

62 строки
1.8 KiB
INI
Исходник Обычный вид История

[tox]
envlist = py39
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 --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
commands =
pip check
# 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 =
2022-08-25 00:23:35 +03:00
pip install --upgrade pip
pip install mkdocs mkdocs-material mdx_truly_sane_lists
commands =
mkdocs build
commands_post =
[testenv:docker]
whitelist_externals=
docker-compose
commands_pre =
docker-compose build
commands =
docker-compose run -e TREEHERDER_DEBUG=False backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
2023-07-05 17:43:31 +03:00
[testenv:docker-postgres]
whitelist_externals=
docker-compose
commands_pre =
docker-compose build
commands =
docker-compose run -e TREEHERDER_DEBUG=False -e DATABASE_URL=psql://postgres:mozilla1234@localhost/treeherder backend bash -c "pytest --cov --cov-report=xml tests/ --runslow -p no:unraisableexception"
[flake8]
per-file-ignores = treeherder/model/models.py:E402