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

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

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

Valentin Samir's avatar
Valentin Samir committed
20 21 22 23 24 25 26 27 28 29
[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

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

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

Valentin Samir's avatar
Valentin Samir committed
48 49 50 51 52 53
[testenv:py27-django19]
basepython=python2.7
deps =
    Django>=1.9,<1.10
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
54 55 56 57 58 59 60 61 62 63 64 65
[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}

Valentin Samir's avatar
Valentin Samir committed
66 67 68 69 70 71
[testenv:py34-django19]
basepython=python3.4
deps =
    Django>=1.9,<1.10
    {[base]deps}

Valentin Samir's avatar
Valentin Samir committed
72 73 74
[testenv:flake8]
basepython=python
deps=flake8
Valentin Samir's avatar
Valentin Samir committed
75 76 77 78 79
skip_install=True
commands=
    flake8 {toxinidir}/cas_server
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
Valentin Samir's avatar
Valentin Samir committed
80

81 82 83 84 85
[testenv:check_rst]
basepython=python
deps=
    docutils
    Pygments
Valentin Samir's avatar
Valentin Samir committed
86 87 88 89 90
skip_install=True
commands=
    rst2html.py --strict {toxinidir}/README.rst /dev/null
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}
91

92 93
[testenv:coverage]
basepython=python
94
passenv=CODACY_PROJECT_TOKEN
95
deps=
96
    -r{toxinidir}/requirements.txt
97 98
    -r{toxinidir}/requirements-dev.txt
    codacy-coverage
Valentin Samir's avatar
Valentin Samir committed
99
skip_install=True
100 101 102
commands=
    py.test --cov=cas_server --cov-report xml
    python-codacy-coverage -r {toxinidir}/coverage.xml
Valentin Samir's avatar
Valentin Samir committed
103 104
    {[post_cmd]commands}
whitelist_externals={[post_cmd]whitelist_externals}