tox.ini 2.6 KB
Newer Older
1 2
[tox]
envlist=
3
    flake8,
4
    check_rst,
5 6
    py27-django17,
    py27-django18,
7
    py27-django19,
Valentin Samir's avatar
Valentin Samir committed
8
    py27-django110,
Valentin Samir's avatar
Valentin Samir committed
9 10
    py34-django17,
    py34-django18,
11
    py34-django19,
Valentin Samir's avatar
Valentin Samir committed
12
    py34-django110,
13 14
    py35-django18,
    py35-django19,
Valentin Samir's avatar
Valentin Samir committed
15
    py35-django110,
16 17 18 19 20 21 22 23 24

[flake8]
max-line-length=100
exclude=migrations

[base]
deps =
    -r{toxinidir}/requirements-dev.txt

Valentin Samir's avatar
Valentin Samir committed
25 26 27 28 29 30 31 32 33 34
[post_cmd]
commands=
    find {toxworkdir} -name '*.pyc' -delete
    mkdir -p {toxinidir}/tox_logs/
    bash -c "mv  {toxworkdir}/{envname}/log/* {toxinidir}/tox_logs/"
whitelist_externals=
    find
    bash
    mkdir

35
[testenv]
Valentin Samir's avatar
Valentin Samir committed
36
commands=
37
    py.test -rw {posargs:cas_server/tests/}
Valentin Samir's avatar
Valentin Samir committed
38 39
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
40 41 42 43 44 45 46 47 48 49 50 51 52

[testenv:py27-django17]
basepython=python2.7
deps =
    Django>=1.7,<1.8
    {[base]deps}

[testenv:py27-django18]
basepython=python2.7
deps =
    Django>=1.8,<1.9
    {[base]deps}

53 54 55 56 57 58
[testenv:py27-django19]
basepython=python2.7
deps =
    Django>=1.9,<1.10
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
59 60 61 62 63 64
[testenv:py27-django110]
basepython=python2.7
deps =
    Django>=1.10,<1.11
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
65 66 67 68 69 70 71 72 73 74 75 76
[testenv:py34-django17]
basepython=python3.4
deps =
    Django>=1.7,<1.8
    {[base]deps}

[testenv:py34-django18]
basepython=python3.4
deps =
    Django>=1.8,<1.9
    {[base]deps}

77 78 79 80 81 82
[testenv:py34-django19]
basepython=python3.4
deps =
    Django>=1.9,<1.10
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
83 84 85 86 87 88
[testenv:py34-django110]
basepython=python3.4
deps =
    Django>=1.10,<1.11
    {[base]deps}

89 90 91 92 93 94 95 96 97 98 99 100
[testenv:py35-django18]
basepython=python3.5
deps =
    Django>=1.8,<1.9
    {[base]deps}

[testenv:py35-django19]
basepython=python3.5
deps =
    Django>=1.9,<1.10
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
101 102 103 104 105 106
[testenv:py35-django110]
basepython=python3.5
deps =
    Django>=1.10,<1.11
    {[base]deps}

107

108 109 110
[testenv:flake8]
basepython=python
deps=flake8
Valentin Samir's avatar
Valentin Samir committed
111 112 113 114 115
skip_install=True
commands=
    flake8 {toxinidir}/cas_server
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
116

117 118 119 120 121
[testenv:check_rst]
basepython=python
deps=
    docutils
    Pygments
Valentin Samir's avatar
Valentin Samir committed
122 123 124
skip_install=True
commands=
    rst2html.py --strict {toxinidir}/README.rst /dev/null
125
    rst2html.py --halt=warning {toxinidir}/CHANGELOG.rst /dev/null
Valentin Samir's avatar
Valentin Samir committed
126 127
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
128

129 130
[testenv:coverage]
basepython=python
131 132 133 134 135
passenv=
    COVERAGE_TOKEN
    CI_BUILD_REF_NAME
    TRAVIS_BRANCH
    TRAVIS_PULL_REQUEST
136
deps=
137
    -r{toxinidir}/requirements.txt
138
    -r{toxinidir}/requirements-dev.txt
Valentin Samir's avatar
Valentin Samir committed
139
skip_install=True
140
commands=
141
    py.test --cov=cas_server --cov-report term --cov-report html
142
    {toxinidir}/.update_coverage "{toxinidir}" "django-cas-server"
Valentin Samir's avatar
Valentin Samir committed
143 144
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}