зеркало из https://github.com/mozilla/treeherder.git
57 строки
1.5 KiB
INI
57 строки
1.5 KiB
INI
[tox]
|
|
envlist = py37
|
|
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
|
|
{toxinidir}/manage.py check
|
|
commands =
|
|
pip check
|
|
{toxinidir}/lints/queuelint.py
|
|
flake8 --show-source
|
|
pre-commit run --all-files
|
|
sh -c "SITE_URL=https://treeherder.dev TREEHERDER_DEBUG=False ./manage.py check --deploy --fail-level WARNING"
|
|
# Exercising running tests outside of Docker
|
|
pytest tests/ --ignore=tests/selenium
|
|
commands_post =
|
|
# This is to deal with running the containers with --detached
|
|
docker-compose down
|
|
|
|
[testenv:docs]
|
|
commands_pre =
|
|
pip install poetry
|
|
poetry install --extras "docs"
|
|
commands =
|
|
mkdocs build
|
|
commands_post =
|
|
|
|
[testenv:docker]
|
|
whitelist_externals=
|
|
docker-compose
|
|
commands_pre =
|
|
docker-compose build
|
|
commands =
|
|
docker-compose run backend bash -c "pytest --cov --cov-report=xml tests/ --runslow --ignore=tests/selenium"
|
|
|
|
[testenv:selenium]
|
|
whitelist_externals =
|
|
yarn
|
|
docker-compose
|
|
commands_pre =
|
|
docker-compose build
|
|
yarn install
|
|
commands =
|
|
yarn build
|
|
# XXX: We have the Gecko driver inside of the Docker instance, thus, needing Selenium tests
|
|
# running inside the Docker container
|
|
docker-compose run backend bash -c "pytest --cov --cov-report=xml tests/selenium/"
|