forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
49 lines (47 loc) · 1.48 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
[tox]
envlist = py{2.7,3.4,3.5,3.6,3.7,3.8}, postgres
[testenv]
usedevelop = True
whitelist_externals=
rm
make
sh
setenv =
KOLIBRI_HOME = {envtmpdir}/.kolibri
DJANGO_SETTINGS_MODULE = kolibri.deployment.default.settings.test
KOLIBRI_RUN_MODE = tox
SKIP_PY_CHECK = 1
basepython =
py2.7: python2.7
py3.4: python3.4
py3.5: python3.5
py3.6: python3.6
py3.7: python3.7
py3.8: python3.8
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/base.txt
-r{toxinidir}/requirements/cext.txt
commands =
sh -c 'kolibri manage makemigrations --check'
# Run the actual tests
py.test {posargs:--cov=kolibri --cov-report= --cov-append --color=no}
# Fail if the log is longer than 200 lines (something erroring or very noisy got added)
sh -c "if [ `cat {env:KOLIBRI_HOME}/logs/kolibri.txt | wc -l` -gt 200 ] ; then echo 'Log too long' && echo '' && tail -n 20 {env:KOLIBRI_HOME}/logs/kolibri.txt && exit 1 ; fi"
[testenv:postgres]
passenv = TOX_ENV
setenv =
PYTHONPATH = {toxinidir}
KOLIBRI_HOME = {envtmpdir}/.kolibri
DJANGO_SETTINGS_MODULE = kolibri.deployment.default.settings.postgres_test
KOLIBRI_RUN_MODE = tox
basepython =
postgres: python3.5
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/base.txt
-r{toxinidir}/requirements/cext.txt
-r{toxinidir}/requirements/postgres.txt
commands =
py.test {posargs:--cov=kolibri --color=no}
# rm -rf {env:KOLIBRI_HOME}