tox.ini 1.61 KB
Newer Older
Jamesie Pic's avatar
Jamesie Pic committed
1
2
3
4
5
6
7
8
9
10
11
[tox]
envlist = py27,qa,docs

[testenv]
setenv =
    CI=True
    DJANGO_DEBUG=True
    DJANGO_SETTINGS_MODULE=memopol.settings

usedevelop = true
commands =
okhin's avatar
okhin committed
12
13
    env
    exit 0
14
15
    pip install -U pip
    pip install -U setuptools
Jamesie Pic's avatar
Jamesie Pic committed
16
17
    pip install -Ue {toxinidir}[testing]
    {toxinidir}/src/memopol/bin/install_client_deps.sh
okhin's avatar
okhin committed
18
    cp {toxinidir}/src/memopol/tests/local_settings.py {toxinidir}/src/memopol/local_settings.py
Jamesie Pic's avatar
Jamesie Pic committed
19
    py.test src/
20
    memopol migrate
21
22
23
24
25
26
27
    bash -c 'cat src/representatives/contrib/francedata/tests/representatives_input.json | francedata_import_representatives'
    bash -c 'cat src/representatives/contrib/parltrack/tests/representatives_fixture.json | parltrack_import_representatives'
    bash -c 'cat src/representatives_votes/contrib/francedata/tests/dossiers_input.json | francedata_import_dossiers'
    bash -c 'cat src/representatives_votes/contrib/francedata/tests/scrutins_input.json | francedata_import_scrutins'
    bash -c 'cat src/representatives_votes/contrib/francedata/tests/votes_input.json | francedata_import_votes'
    bash -c 'cat src/representatives_votes/contrib/parltrack/tests/dossiers_fixture.json | parltrack_import_dossiers'
    bash -c 'cat src/representatives_votes/contrib/parltrack/tests/votes_fixture.json | parltrack_import_votes'
Jamesie Pic's avatar
Jamesie Pic committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

whitelist_externals =
    psql

[testenv:qa]
skipsdist=True
changedir = {toxinidir}
basepython = python2.7
commands =
    pip install -Ue {toxinidir}[testing]
    flake8 src --exclude '*/migrations,docs,static' --ignore E128

[testenv:docs]
skipsdist=True
changedir = {toxinidir}/docs
deps =
    sphinx
commands =
    make html
whitelist_externals =
    make