forked from mysociety/mapit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (34 loc) · 1.76 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
notifications:
email: false
irc:
channels:
- "irc.mysociety.org#mapit"
use_notice: true
skip_join: true
language: python
env:
- MODULES="Django>=1.4,<1.5"
- MODULES="Django>=1.5,<1.6"
- MODULES="git+https://github.com/django/django.git@stable/1.6.x#egg=django"
# - MODULES="git+https://github.com/django/django.git#egg=django"
install:
- sudo apt-get update -qq
- sudo apt-get install -qq libgdal1-dev libgdal1-1.7.0 python-gdal
- sudo apt-get install -qq libproj-dev gdal-bin binutils
- ln -s /usr/lib/python2.7/dist-packages/osgeo ~/virtualenv/python2.7/lib/python2.7/site-packages/
- ln -s /usr/lib/python2.7/dist-packages/GDAL-1.7.3.egg-info ~/virtualenv/python2.7/lib/python2.7/site-packages/
- pip install $MODULES --use-mirrors
- pip install -r requirements.txt --use-mirrors
- createdb -E UTF8 template_postgis &&
( createlang -d template_postgis -l | grep plpgsql || createlang -d template_postgis plpgsql ) &&
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" &&
psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/postgis.sql &&
psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/spatial_ref_sys.sql &&
psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/legacy_gist.sql &&
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" &&
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" &&
psql -d template_postgis -c "GRANT ALL ON geography_columns TO PUBLIC;"
- sudo /etc/init.d/postgresql reload
- "echo -e 'MAPIT_DB_NAME: template_postgis\nMAPIT_DB_USER: postgres\nDJANGO_SECRET_KEY: secret' > conf/general.yml"
script:
- python -Wall manage.py test mapit