forked from mozilla/addons-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
83 lines (74 loc) · 3.06 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[testenv]
passenv = *
install_command = pip install --no-deps {packages}
setenv =
PYTHONPATH=src
ADDONS_LINTER_BIN={toxinidir}/node_modules/.bin/addons-linter
CLEANCSS_BIN={toxinidir}/node_modules/.bin/cleancss
LESS_BIN={toxinidir}/node_modules/.bin/lessc
JS_MINIFIER_BIN={toxinidir}/node_modules/.bin/terser
DJANGO_SETTINGS_MODULE=settings_test
whitelist_externals =
make
npm
bash
pytest
[testenv:es]
commands =
make install_python_test_dependencies
pytest -m "es_tests and not needs_locales_compilation and not static_assets" -v src/olympia/ {posargs}
[testenv:addons-versions-files-ratings]
commands =
make install_python_test_dependencies
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/ src/olympia/ratings/ {posargs}
[testenv:devhub]
commands =
make 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]
whitelist_externals =
{[testenv]whitelist_externals}
sed
commands =
make 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}
# We need to change the setting in the file because we can't override an env
# variable here, and the next command requires `INTERNAL_ROUTES_ALLOWED` to be
# set to `True`.
sed -i 's/^INTERNAL_ROUTES_ALLOWED.*/INTERNAL_ROUTES_ALLOWED=True/' settings_test.py
pytest -m 'internal_routes_allowed' -v src/olympia/ {posargs}
[testenv:amo-lib-locales-and-signing]
commands =
make 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/ src/olympia/signing {posargs}
bash {toxinidir}/locale/compile-mo.sh {toxinidir}/locale/
pytest -n 2 -m 'needs_locales_compilation' -v src/olympia/ {posargs}
[testenv:main]
commands =
make install_python_test_dependencies install_node_dependencies
pytest -n 2 -m 'not es_tests and not needs_locales_compilation and not static_assets and not internal_routes_allowed' -v src/olympia/ \
--ignore src/olympia/addons/ \
--ignore src/olympia/devhub/ \
--ignore src/olympia/files/ \
--ignore src/olympia/reviewers/ \
--ignore src/olympia/ratings/ \
--ignore src/olympia/amo/ \
--ignore src/olympia/lib/ \
--ignore src/olympia/signing \
--ignore src/olympia/versions/ \
--ignore src/olympia/zadmin \
{posargs}
[testenv:assets]
commands =
make update_deps update_assets
pytest -m "static_assets" -v src/olympia/ {posargs}
make run_js_tests
[testenv:codestyle]
recreate = True
commands =
make setup-codestyle install_node_dependencies
make lint-codestyle
[testenv:docs]
commands =
pip install --no-deps -r requirements/docs.txt
make docs