tox.ini 2.46 KB
Newer Older
1 2
[tox]
envlist=
3
    flake8,
4
    check_rst,
5 6
    py27-django111,
    py36-django111,
7
    py36-django20,
8 9 10 11 12 13 14 15 16

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

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

Valentin Samir's avatar
Valentin Samir committed
17 18 19 20 21 22 23 24 25 26
[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

27
[testenv]
Valentin Samir's avatar
Valentin Samir committed
28
commands=
29
    py.test -rw {posargs:cas_server/tests/}
Valentin Samir's avatar
Valentin Samir committed
30 31
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
32 33 34 35 36 37 38 39 40 41 42 43 44

[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}

45 46 47 48 49 50
[testenv:py27-django19]
basepython=python2.7
deps =
    Django>=1.9,<1.10
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
51 52 53 54 55 56
[testenv:py27-django110]
basepython=python2.7
deps =
    Django>=1.10,<1.11
    {[base]deps}

57 58 59 60 61 62
[testenv:py27-django111]
basepython=python2.7
deps =
    Django>=1.11,<1.12
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
63 64 65 66 67 68 69 70 71 72 73 74
[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}

75 76
[testenv:py35-django110]
basepython=python3.5
Valentin Samir's avatar
Valentin Samir committed
77 78 79 80
deps =
    Django>=1.10,<1.11
    {[base]deps}

81
[testenv:py35-django111]
82 83
basepython=python3.5
deps =
84
    Django>=1.11,<1.12
85 86
    {[base]deps}

87 88
[testenv:py36-django111]
basepython=python3.6
89
deps =
90
    Django>=1.11,<1.12
91 92
    {[base]deps}

93 94 95 96 97 98
[testenv:py36-django20]
basepython=python3.6
deps =
    Django>=2.0,<2.1
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
99

100

101 102 103
[testenv:flake8]
basepython=python
deps=flake8
Valentin Samir's avatar
Valentin Samir committed
104 105 106 107 108
skip_install=True
commands=
    flake8 {toxinidir}/cas_server
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
109

110 111 112 113 114
[testenv:check_rst]
basepython=python
deps=
    docutils
    Pygments
Valentin Samir's avatar
Valentin Samir committed
115 116 117
skip_install=True
commands=
    rst2html.py --strict {toxinidir}/README.rst /dev/null
118
    rst2html.py --halt=warning {toxinidir}/CHANGELOG.rst /dev/null
Valentin Samir's avatar
Valentin Samir committed
119 120
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
121

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