summaryrefslogtreecommitdiff
path: root/tox.ini
blob: af43e94382c56afe07500594d66404cfb19b4afc (plain)
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
# Tox (http://tox.testrun.org/) is a tool for running tests in multiple
# virtualenvs. This configuration file helps to run the test suite on all
# supported Python versions. To use it, "pip install tox" and then run "tox"
# from this directory.

[tox]
skipsdist = true
envlist =
    py3
    flake8
    docs
    isort

# Add environments to use default python2 and python3 installations
[testenv:py2]
basepython = python2

[testenv:py3]
basepython = python3

[testenv]
usedevelop = true
passenv = DJANGO_SETTINGS_MODULE PYTHONPATH HOME DISPLAY
setenv =
    PYTHONDONTWRITEBYTECODE=1
deps =
    py{2,27}: -rtests/requirements/py2.txt
    py{3,34,35,36,37}: -rtests/requirements/py3.txt
    postgres: -rtests/requirements/postgres.txt
    mysql: -rtests/requirements/mysql.txt
    oracle: -rtests/requirements/oracle.txt
changedir = tests
commands =
    {envpython} runtests.py {posargs}

[testenv:flake8]
basepython = python3
usedevelop = false
deps = flake8
changedir = {toxinidir}
commands = flake8 .

[testenv:docs]
# On OS X, as of pyenchant 1.6.6, the docs build only works under Python 2.
basepython = python2
usedevelop = false
whitelist_externals =
    make
deps =
    Sphinx
    pyenchant
    sphinxcontrib-spelling
changedir = docs
commands =
    make spelling

[testenv:isort]
basepython = python3
usedevelop = false
deps = isort
changedir = {toxinidir}
commands = isort --recursive --check-only --diff django tests scripts

[testenv:javascript]
usedevelop = false
deps =
changedir = {toxinidir}
whitelist_externals = npm
commands =
    npm install
    npm test