treeherder/tox.ini

51 строка
1.4 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
pip install -r {toxinidir}/requirements/docs.txt
{toxinidir}/manage.py check
commands =
pip check
{toxinidir}/lints/queuelint.py
flake8 --show-source
mkdocs build
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 --ignore=tests/extract
commands_post =
# This is to deal with running the containers with --detached
docker-compose down
[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/"