forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
119 lines (105 loc) · 3.18 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
[tox]
envlist = py{2.7,3.4,3.5,pypy}, pythonlint, npmbuild, node4.x, docs, bdd, node, postgres, pythonbuild{2.7, 3.4, 3.5}
[testenv]
usedevelop = True
whitelist_externals=rm
setenv =
PYTHONPATH = {toxinidir}
KOLIBRI_HOME = {envtmpdir}/.kolibri
DJANGO_SETTINGS_MODULE = kolibri.deployment.default.settings.test
basepython =
pythonbuild2.7: python2.7
pythonbuild3.4: python3.4
pythonbuild3.5: python3.5
licenses: python2.7
py2.7: python2.7
py3.4: python3.4
py3.5: python3.5
pypy: pypy
docs: python2.7
pythonlint: python2.7
bdd: python2.7
node4.x: python2.7
npmbuild: python2.7
deps =
-r{toxinidir}/requirements/test.txt
commands =
# Enable the plugins to ensure the configuration is read without error
coverage run -p kolibri plugin kolibri.plugins.learn enable
coverage run -p kolibri plugin kolibri.plugins.management enable
coverage run -p kolibri start
coverage run -p kolibri stop
py.test {posargs:--cov=kolibri --color=no}
# This is currently disabled because some process seems to be locking
# the directory:
# /bin/rm: cannot remove `/home/travis/build/learningequality/kolibri/.tox/py3.5/tmp/.kolibri': Directory not empty
# rm -rf {env:KOLIBRI_HOME}
[testenv:postgres]
setenv =
PYTHONPATH = {toxinidir}
KOLIBRI_HOME = {envtmpdir}/.kolibri
DJANGO_SETTINGS_MODULE = kolibri.deployment.default.settings.postgres_test
basepython =
postgres: python2.7
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/postgres.txt
commands =
py.test {posargs:--cov=kolibri --color=no}
rm -rf {env:KOLIBRI_HOME}
[testenv:pythonlint]
deps =
-r{toxinidir}/requirements/dev.txt
commands =
flake8 kolibri
##### remove the link checker test because it causes random failures
#[testenv:docs]
#changedir=docs/
#deps =
# -r{toxinidir}/requirements/docs.txt
#commands =
# sphinx-build -b linkcheck ./ _build/
[testenv:bdd]
deps =
-r{toxinidir}/requirements/bdd.txt
commands =
python setup.py bdd
[node_base]
whitelist_externals =
yarn
npm
commands =
yarn
# Node-sass gets mardy if we don't do this.
npm rebuild node-sass
yarn run coverage
[testenv:node4.x]
whitelist_externals = {[node_base]whitelist_externals}
commands = {[node_base]commands}
[testenv:npmbuild]
whitelist_externals = {[node_base]whitelist_externals}
commands =
yarn
# Node-sass gets mardy if we don't do this.
npm rebuild node-sass
yarn run build
yarn run test-build
[conditional_testing_base]
whitelist_externals =
{toxinidir}/test/if.sh
[python_build_base]
commands =
{toxinidir}/test/if.sh "setup_changed"
[testenv:pythonbuild2.7]
whitelist_externals = {[conditional_testing_base]whitelist_externals}
commands = {[python_build_base]commands}
[testenv:pythonbuild3.4]
whitelist_externals = {[conditional_testing_base]whitelist_externals}
commands = {[python_build_base]commands}
[testenv:pythonbuild3.5]
whitelist_externals = {[conditional_testing_base]whitelist_externals}
commands = {[python_build_base]commands}
[testenv:licenses]
whitelist_externals = {[conditional_testing_base]whitelist_externals}
commands =
{toxinidir}/test/if.sh "requirements_changed"