addons-server/tox.ini

91 строка
3.2 KiB
INI

[tox]
envlist = es, addons, amo-locales-and-signin, devhub, reviewers-and-zadmin, users-accounts-and-ratings, main, ui-tests, flake8, docs, assets
[travis]
unignore_outcomes = True
[testenv]
passenv = *
install_command = pip install --no-deps {packages}
setenv =
PYTHONPATH=src
ADDONS_LINTER_BIN={toxinidir}/node_modules/.bin/addons-linter
DJANGO_SETTINGS_MODULE=settings_test
whitelist_externals =
make
npm
bash
pytest
ignore_outcome = True
[testenv:es]
commands =
make -f Makefile-docker install_python_test_dependencies
pytest -m "es_tests and not needs_locales_compilation and not static_assets" --ignore=tests/ui/ -v src/olympia/{posargs}
[testenv:addons]
commands =
make -f Makefile-docker install_python_test_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/addons/ {posargs}
[testenv:devhub]
commands =
make -f Makefile-docker install_python_test_dependencies install_node_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/devhub/ {posargs}
[testenv:reviewers-and-zadmin]
commands =
make -f Makefile-docker install_python_test_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/reviewers/ src/olympia/zadmin/ {posargs}
[testenv:amo-locales-and-signing]
commands =
make -f Makefile-docker install_python_test_dependencies install_node_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/amo/ src/olympia/lib/crypto/ src/olympia/signing {posargs}
bash {toxinidir}/locale/compile-mo.sh {toxinidir}/locale/
pytest -n 2 -m 'needs_locales_compilation' -v src/olympia/ {posargs}
[testenv:users-accounts-and-ratings]
commands =
make -f Makefile-docker install_python_test_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/users/ src/olympia/accounts/ src/olympia/ratings/ {posargs}
[testenv:main]
commands =
make -f Makefile-docker install_python_test_dependencies install_node_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/ \
--ignore src/olympia/addons/ \
--ignore src/olympia/devhub/ \
--ignore src/olympia/reviewers/ \
--ignore src/olympia/ratings/ \
--ignore src/olympia/amo/ \
--ignore src/olympia/users/ \
--ignore src/olympia/accounts/ \
--ignore src/olympia/lib/crypto \
--ignore src/olympia/signing \
--ignore src/olympia/zadmin \
{posargs}
[testenv:ui-tests]
commands =
make -f Makefile-docker update_deps
make -f Makefile-docker run-ui-tests
[testenv:assets]
commands =
make -f Makefile-docker update_deps
pytest -m "static_assets" --ignore=tests/ui/ -v src/olympia/ {posargs}
make -f Makefile-docker update_assets
[testenv:codestyle]
recreate = True
commands =
pip install -r requirements/flake8.txt
make flake8
[testenv:docs]
commands =
pip install -r requirements/docs.txt
make -f Makefile-docker docs SPHINXOPTS='-nW'