2014-11-19 19:36:40 +03:00
[tox]
2019-02-07 09:56:39 +03:00
envlist =
es, devhub, main, ui-tests, docs, assets, codestyle
addons-versions-and-files,
amo-lib-locales-and-signin,
reviewers-and-zadmin,
accounts-users-and-ratings,
2014-11-19 19:36:40 +03:00
[testenv]
2017-11-13 19:29:57 +03:00
passenv = *
2016-05-12 19:31:40 +03:00
install_command = pip install --no-deps {packages}
2014-11-19 19:36:40 +03:00
setenv =
2015-12-23 16:39:55 +03:00
PYTHONPATH = src
2016-03-10 02:37:09 +03:00
ADDONS_LINTER_BIN = {toxinidir}/node_modules/.bin/addons-linter
2018-10-16 09:30:16 +03:00
CLEANCSS_BIN = {toxinidir}/node_modules/.bin/cleancss
LESS_BIN = {toxinidir}/node_modules/.bin/lessc
UGLIFY_BIN = {toxinidir}/node_modules/.bin//uglifyjs
2016-05-12 18:40:27 +03:00
DJANGO_SETTINGS_MODULE = settings_test
2014-11-19 19:36:40 +03:00
whitelist_externals =
make
2014-12-18 13:52:39 +03:00
npm
2017-06-20 14:43:11 +03:00
bash
2018-02-02 14:47:50 +03:00
pytest
2014-11-19 19:36:40 +03:00
[testenv:es]
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies
2018-06-28 16:27:34 +03:00
pytest -m "es_tests and not needs_locales_compilation and not static_assets" --ignore = tests/ui/ -v src/olympia/{posargs}
2014-11-19 19:36:40 +03:00
2019-02-05 11:31:50 +03:00
[testenv:addons-versions-and-files]
2014-11-19 19:36:40 +03:00
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies
2019-02-05 11:31:50 +03:00
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/addons/ src/olympia/versions/ src/olympia/files/ {posargs}
2016-03-31 18:35:54 +03:00
[testenv:devhub]
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies install_node_dependencies
2018-06-28 16:27:34 +03:00
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/devhub/ {posargs}
2016-03-31 18:35:54 +03:00
2018-09-17 10:10:18 +03:00
[testenv:reviewers-and-zadmin]
2016-03-31 18:35:54 +03:00
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies
2018-09-17 10:10:18 +03:00
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/reviewers/ src/olympia/zadmin/ {posargs}
2016-07-06 18:46:50 +03:00
2019-01-23 18:23:06 +03:00
[testenv:amo-lib-locales-and-signing]
2016-07-06 18:46:50 +03:00
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies install_node_dependencies
2019-01-23 18:23:06 +03:00
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/amo/ src/olympia/lib/ src/olympia/signing {posargs}
2017-06-20 14:43:11 +03:00
bash {toxinidir}/locale/compile-mo.sh {toxinidir}/locale/
2018-02-02 14:47:50 +03:00
pytest -n 2 -m 'needs_locales_compilation' -v src/olympia/ {posargs}
2016-07-06 18:46:50 +03:00
2019-01-24 12:31:14 +03:00
[testenv:accounts-users-and-ratings]
2016-07-06 18:46:50 +03:00
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies
2019-01-24 12:31:14 +03:00
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets' -v src/olympia/accounts/ src/olympia/users/ src/olympia/ratings/ {posargs}
2016-07-06 18:46:50 +03:00
2014-11-19 19:36:40 +03:00
[testenv:main]
commands =
2019-02-13 18:21:05 +03:00
make install_python_test_dependencies install_node_dependencies
2018-09-17 10:10:18 +03:00
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/ \
2019-01-23 18:23:06 +03:00
--ignore src/olympia/files/ \
2018-09-17 10:10:18 +03:00
--ignore src/olympia/reviewers/ \
--ignore src/olympia/ratings/ \
--ignore src/olympia/amo/ \
--ignore src/olympia/users/ \
--ignore src/olympia/accounts/ \
2019-01-23 18:23:06 +03:00
--ignore src/olympia/lib/ \
2018-09-17 10:10:18 +03:00
--ignore src/olympia/signing \
2019-02-05 11:31:50 +03:00
--ignore src/olympia/versions/ \
2018-09-17 10:10:18 +03:00
--ignore src/olympia/zadmin \
{posargs}
2016-06-27 11:30:28 +03:00
[testenv:ui-tests]
2017-02-07 22:21:09 +03:00
commands =
2017-06-16 18:46:00 +03:00
make -f Makefile-docker update_deps
2018-08-28 21:48:35 +03:00
make -f Makefile-docker run-ui-tests
2014-11-19 19:36:40 +03:00
2014-12-18 13:52:39 +03:00
[testenv:assets]
commands =
2019-02-13 18:21:05 +03:00
make update_deps
2018-06-28 16:27:34 +03:00
pytest -m "static_assets" --ignore = tests/ui/ -v src/olympia/ {posargs}
2014-12-18 13:52:39 +03:00
2018-01-08 14:05:14 +03:00
[testenv:codestyle]
2016-09-22 15:37:52 +03:00
recreate = True
2017-06-01 14:20:12 +03:00
commands =
2019-02-13 18:21:05 +03:00
make setup-codestyle
2019-02-07 09:56:39 +03:00
make lint-codestyle
2014-11-19 19:36:40 +03:00
[testenv:docs]
2016-04-12 03:59:28 +03:00
commands =
2017-06-01 14:20:12 +03:00
pip install -r requirements/docs.txt
2019-02-13 18:21:05 +03:00
make docs