tox.ini 1.38 KB
Newer Older
Stephen Finucane's avatar
Stephen Finucane committed
1
[tox]
2
minversion = 1.6
3
envlist = {py27}-django{18,111}, pep8
Stephen Finucane's avatar
Stephen Finucane committed
4 5
skipsdist = True

6 7 8
[testenv]
deps =
    -r{toxinidir}/docs/requirements-dev.txt
9
    mysqlclient>=1.3.0,<1.4
10
    django18: django>=1.8,<1.9
11
    django111: django>=1.11,<1.12
12 13 14 15
setenv =
    DJANGO_SETTINGS_MODULE = patchwork.settings.dev
passenv =
    http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
16
    PW_TEST_DB_TYPE PW_TEST_DB_USER PW_TEST_DB_PASS DISPLAY
17
    PATCHWORK_SKIP_BROWSER_TESTS SELENIUM_BROWSER
Stephen Finucane's avatar
Stephen Finucane committed
18
commands =
19
    {toxinidir}/manage.py test --noinput '{posargs:patchwork}'
20

Stephen Finucane's avatar
Stephen Finucane committed
21
[testenv:pep8]
22
basepython = python2.7
23
deps = flake8
24
commands = flake8 {posargs:patchwork patchwork/bin/pwclient git-pw/git-pw}
Stephen Finucane's avatar
Stephen Finucane committed
25 26

[flake8]
27
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E203,E241,E251,H405,F405
28
exclude = ./patchwork/migrations
Stephen Finucane's avatar
Stephen Finucane committed
29 30 31 32 33

[testenv:lint]
basepython = python2.7
deps =
    pylint
34
    pylint-django
35
    -r{toxinidir}/docs/requirements-prod-mysql.txt
36
commands = pylint --rcfile=pylint.rc --load-plugins pylint_django {posargs:patchwork}
Stephen Finucane's avatar
Stephen Finucane committed
37

38 39 40
[testenv:venv]
commands = {posargs}

Stephen Finucane's avatar
Stephen Finucane committed
41 42 43 44
[testenv:coverage]
basepython = python2.7
deps =
    coverage
45
    -r{toxinidir}/docs/requirements-prod-mysql.txt
Stephen Finucane's avatar
Stephen Finucane committed
46 47 48 49
setenv =
    DJANGO_SETTINGS_MODULE = patchwork.settings.dev
commands =
    coverage erase
50
    coverage run --omit=*tox*,patchwork/tests/*.py,manage.py --branch \
51
        {toxinidir}/manage.py test --noinput patchwork
Stephen Finucane's avatar
Stephen Finucane committed
52
    coverage report -m