forked from openedx-unsupported/ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
128 lines (113 loc) · 4.21 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
118
119
120
121
122
123
124
125
126
127
[tox]
skipsdist=True
envlist = py38-django22-{static,pylint,tests,theme_static,check_keywords},py38-{isort,pycodestyle,extract_translations,dummy_translations,compile_translations, detect_changed_translations,validate_translations}
[pytest]
addopts = --ds=ecommerce.settings.test --cov=ecommerce --cov-report term --cov-config=.coveragerc --no-cov-on-fail -p no:randomly --no-migrations -m "not acceptance"
testpaths = ecommerce
markers =
acceptance: marks tests as as being browser-driven
[testenv]
envdir=
# Use the same environment for all commands running under a specific python version
py35: {toxworkdir}/py35
py38: {toxworkdir}/py38
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
acceptance: DJANGO_SETTINGS_MODULE = ecommerce.settings.test
check_keywords: DJANGO_SETTINGS_MODULE = ecommerce.settings.test
BOKCHOY_HEADLESS = true
NODE_BIN = ./node_modules/.bin
PATH=$PATH:$NODE_BIN
SELENIUM_BROWSER=firefox
deps =
-r{toxinidir}/requirements/test.txt
django22: Django>=2.2,<2.3
whitelist_externals =
/bin/bash
changedir =
dummy_translations,compile_translations,detect_changed_translations,validate_translations: ecommerce
commands =
static: python manage.py collectstatic --noinput --verbosity 0
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 -
check_keywords: python manage.py check_reserved_keywords --override_file db_keyword_overrides.yml
tests: python -Wd -m pytest {posargs}
tests: coverage report
acceptance: python -Wd -m pytest {posargs} -m acceptance --migrations
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
SELENIUM_BROWSER
SELENIUM_FIREFOX_PATH
SELENIUM_HOST
SELENIUM_PLATFORM
SELENIUM_PORT
SELENIUM_VERSION
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:py38-e2e]
envdir = {toxworkdir}/{envname}
passenv = {[testenv:py35-e2e]passenv}
deps = {[testenv:py35-e2e]deps}
commands = {[testenv:py35-e2e]commands}