forked from openedx-unsupported/ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
117 lines (102 loc) · 3.73 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[tox]
skipsdist=True
envlist = {py27,py35}-{isort,pycodestyle,pylint,static,tests,extract_translations,dummy_translations,compile_translations, detect_changed_translations,validate_translations}
[testenv]
envdir=
# Use the same environment for all commands running under a specific python version
py27: {toxworkdir}/py27
py35: {toxworkdir}/py35
passenv =
CONN_MAX_AGE
DB_ENGINE
DB_HOST
DB_NAME
DB_PASSWORD
DB_PORT
DB_USER
DISABLE_ACCEPTANCE_TESTS
DISPLAY
DJANGO_SETTINGS_MODULE
ECOMMERCE_CFG
FIREFOX_PROFILE_PATH
JASMINE_HOSTNAME
JASMINE_WEB_DRIVER
SAUCE_API_KEY
SAUCE_USER_NAME
SELENIUM_BROWSER
SELENIUM_FIREFOX_PATH
SELENIUM_HOST
SELENIUM_PLATFORM
SELENIUM_PORT
SELENIUM_VERSION
TRAVIS
setenv =
tests: DJANGO_SETTINGS_MODULE = ecommerce.settings.test
tests: DISABLE_MIGRATIONS=1
BOKCHOY_HEADLESS = true
NODE_BIN = ./node_modules/.bin
PATH=$PATH:$NODE_BIN
SELENIUM_BROWSER=firefox
deps =
-r requirements/dev.txt
whitelist_externals =
/bin/bash
changedir =
dummy_translations,compile_translations,detect_changed_translations,validate_translations: ecommerce
commands =
# Upgrade sqlite to fix crashes during testing.
py27-tests: bash {toxinidir}/scripts/upgrade_pysqlite.sh
static: python manage.py collectstatic --noinput
static: python manage.py compress --force
theme_static: python manage.py update_assets --skip-collect
check_isort: isort --check-only --recursive --diff e2e/ ecommerce/
run_isort: isort --recursive e2e/ ecommerce/
pycodestyle: pycodestyle --config=.pycodestyle ecommerce e2e
pylint: pylint -j 0 --rcfile=pylintrc ecommerce e2e
extract_translations: python manage.py makemessages -l en -v1 -d django --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="node_modules/*" --ignore="ecommerce/static/bower_components/*" --ignore="ecommerce/static/build/*"
extract_translations: python manage.py makemessages -l en -v1 -d djangojs --ignore="docs/*" --ignore="src/*" --ignore="i18n/*" --ignore="assets/*" --ignore="node_modules/*" --ignore="ecommerce/static/bower_components/*" --ignore="ecommerce/static/build/*"
dummy_translations: i18n_tool dummy
compile_translations: python ../manage.py compilemessages
detect_changed_translations: i18n_tool changed
validate_translations: i18n_tool validate -
tests: coverage run --branch --source=ecommerce \
tests: ./manage.py test {posargs:ecommerce} \
tests: --settings=ecommerce.settings.test --with-ignore-docstrings --logging-level=DEBUG
tests: coverage report
serve: python manage.py runserver 0.0.0.0:8002
migrate: python manage.py migrate --noinput
coverage_html: coverage html && open htmlcov/index.html
fast_diff_coverage: coverage xml
fast_diff_coverage: diff-cover coverage.xml --compare-branch=$(DIFF_COVER_BASE_BRANCH)
[testenv:py35-e2e]
envdir = {toxworkdir}/{envname}
passenv =
BASIC_AUTH_PASSWORD
BASIC_AUTH_USERNAME
DISCOVERY_API_URL_ROOT
DOTENV_PATH
ECOMMERCE_API_URL
ECOMMERCE_TEST_WEB_SECURITY
ECOMMERCE_URL_ROOT
ENROLLMENT_API_URL
HUBSPOT_FORMS_API_URI
HUBSPOT_PORTAL_ID
HUBSPOT_SALES_LEAD_FORM_GUID
LMS_EMAIL
LMS_PASSWORD
LMS_URL_ROOT
LMS_USERNAME
MARKETING_URL_ROOT
OAUTH_ACCESS_TOKEN_URL
OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET
PAYPAL_EMAIL
PAYPAL_PASSWORD
deps = -r requirements/e2e.txt
commands=
xvfb-run --server-args="-screen 0, 1600x1200x24" pytest e2e --html=log/html_report.html --junitxml=e2e/xunit.xml
[testenv:py27-e2e]
envdir = {toxworkdir}/{envname}
passenv = {[testenv:py35-e2e]passenv}
deps = {[testenv:py35-e2e]deps}
commands = {[testenv:py35-e2e]commands}