-
Notifications
You must be signed in to change notification settings - Fork 37
/
tox.ini
82 lines (71 loc) · 2.23 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
#
# If you don't have all the interpreters installed locally, run
#
# `tox --skip-missing-interpreter` to skip interpreters you don't have
#
[tox]
envlist =
py27-ginkgo
py27-hawthorn
py27-hawthorn_multisite
py35-juniper_community
py35-juniper_multisite
lint
edx_lint_check
skip_missing_interpreters=true
[pytest]
[testenv]
deps =
ginkgo: -r{toxinidir}/devsite/requirements/ginkgo.txt
hawthorn: -r{toxinidir}/devsite/requirements/hawthorn.txt
hawthorn_multisite: -r{toxinidir}/devsite/requirements/hawthorn_multisite.txt
juniper_community: -r{toxinidir}/devsite/requirements/juniper_community.txt
juniper_multisite: -r{toxinidir}/devsite/requirements/juniper_multisite.txt
-r{toxinidir}/devsite/requirements/test.txt
whitelist_externals =
git
edx_lint_check
setenv =
DJANGO_SETTINGS_MODULE = devsite.test_settings
PYTHONPATH = {toxinidir}
ginkgo: OPENEDX_RELEASE = GINKGO
hawthorn: OPENEDX_RELEASE = HAWTHORN
hawthorn_multisite: OPENEDX_RELEASE = HAWTHORN
juniper_community: OPENEDX_RELEASE = JUNIPER
juniper_multisite: OPENEDX_RELEASE = JUNIPER
commands =
ginkgo: pytest -c pytest-ginkgo.ini {posargs}
hawthorn: pytest -c pytest-hawthorn.ini {posargs}
hawthorn_multisite: pytest -c pytest-hawthorn.ini {posargs}
juniper_community: pytest -c pytest-juniper.ini {posargs}
juniper_multisite: pytest -c pytest-juniper.ini {posargs}
[testenv:lint]
basepython=python2
deps =
-r{toxinidir}/devsite/requirements/hawthorn.txt
commands =
flake8 figures devsite
pylint --load-plugins pylint_django ./figures
[testenv:edx_lint_check]
basepython=python2
deps =
-r{toxinidir}/devsite/requirements/hawthorn.txt
commands =
edx_lint write pylintrc
echo "If this fails, then you need to run '$ tox -e write_edx_lint' locally"
git diff --exit-code # Ensure pylintrc is up to date
[testenv:write_edx_lint]
basepython=python2
deps =
-r{toxinidir}/devsite/requirements/hawthorn.txt
commands =
edx_lint write pylintrc
[testenv:bandit]
deps =
bandit==1.7.1
commands =
bandit -c bandit.yaml -r figures