forked from makinacorpus/django-leaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (66 loc) · 2.37 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
language: python
python:
- 2.7
- 3.3
- 3.4
env:
matrix:
- DJANGO_VERSION=1.4.15 DATABASE=sqlite
- DJANGO_VERSION=1.6 DATABASE=postgres
- DJANGO_VERSION=1.6 DATABASE=sqlite
- DJANGO_VERSION=1.7 DATABASE=postgres
- DJANGO_VERSION=1.7 DATABASE=sqlite
- DJANGO_VERSION=1.8 DATABASE=postgres
- DJANGO_VERSION=1.8 DATABASE=sqlite
- DJANGO_VERSION=dev DATABASE=postgres
- DJANGO_VERSION=dev DATABASE=sqlite
matrix:
exclude:
- python: 3.3
env: DJANGO_VERSION=1.4.15 DATABASE=sqlite
- python: 3.4
env: DJANGO_VERSION=1.4.15 DATABASE=sqlite
- python: 3.3
env: DJANGO_VERSION=1.6 DATABASE=sqlite
allow_failures:
- python: 3.4
env: DJANGO_VERSION=dev DATABASE=sqlite
- python: 3.4
env: DJANGO_VERSION=dev DATABASE=postgres
- python: 3.3
env: DJANGO_VERSION=dev DATABASE=sqlite
- python: 3.3
env: DJANGO_VERSION=dev DATABASE=postgres
- python: 2.7
env: DJANGO_VERSION=dev DATABASE=sqlite
- python: 2.7
env: DJANGO_VERSION=dev DATABASE=postgres
before_install:
- sudo apt-get update
install:
# GeoDjango dependencies
- sudo apt-get update -qq
- sudo apt-get install -y libproj-dev libgeos-dev
- if [[ $DATABASE == sqlite ]]; then sudo apt-get install -y libspatialite-dev; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' && $DATABASE == sqlite ]]; then pip install git+git://github.com/tinio/pysqlite.git@extension-enabled#egg=pysqlite; fi
- if [[ $DATABASE == postgres ]]; then pip install psycopg2; fi
# This is a dependency of our Django test script
- pip install argparse --use-mirrors
- if [[ $DJANGO_VERSION == dev ]]; then pip
install https://github.com/django/django/tarball/master/django.tar.gz#egg=django; else pip
install -q Django==$DJANGO_VERSION --use-mirrors; fi
- pip install coverage
- pip install flake8
- python setup.py develop
- npm install leaflet/tests/
before_script:
- flake8 --ignore=E501 leaflet
- if [[ $DATABASE == postgres ]]; then psql -c 'create database test_db;' -U postgres; fi
- if [[ $DATABASE == postgres ]]; then psql -c 'CREATE EXTENSION postgis;' -U postgres -d test_db; fi
script:
- python quicktest.py leaflet --db=$DATABASE
- node node_modules/django-leaflet-tests/node_modules/mocha-phantomjs/bin/mocha-phantomjs leaflet/tests/index.html
after_success:
- coverage run quicktest.py leaflet --db=$DATABASE
- pip install coveralls
- coveralls