forked from mysociety/mapit
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.travis.yml
More file actions
57 lines (52 loc) · 2.17 KB
/
.travis.yml
File metadata and controls
57 lines (52 loc) · 2.17 KB
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
notifications:
email: false
irc:
channels:
- "irc.mysociety.org#mapit"
use_notice: true
skip_join: true
language: python
python:
- "2.7"
- "3.2"
env:
- MODULES="Django>=1.4,<1.5"
- MODULES="Django>=1.5,<1.6"
- MODULES="Django>=1.6,<1.7"
- MODULES="Django>=1.7,<1.8"
- MODULES="git+https://github.com/django/django.git@stable/1.8.x#egg=django"
# Django 1.4 did not support Python 3.
matrix:
exclude:
- python: "3.2"
env: MODULES="Django>=1.4,<1.5"
allow_failures:
- env: MODULES="git+https://github.com/django/django.git@stable/1.8.x#egg=django"
install:
- sudo rm /etc/apt/sources.list.d/ubuntugis-stable-source.list
- sudo apt-get update -qq
- sudo apt-get install -qq gdal-bin binutils
- pip install $MODULES
- CFLAGS="-O0" pip install -e .
# The below is for Django 1.4 compatibility. If you don't need that, you could
# just do the before_script step commented out below.
- 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 >/dev/null &&
psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/spatial_ref_sys.sql >/dev/null &&
psql -d template_postgis -f /usr/share/postgresql/9.1/contrib/postgis-2.1/legacy_gist.sql >/dev/null &&
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
before_script:
# - createdb -U postgres mapit
# - psql -U postgres -d mapit -c 'create extension postgis;'
- createdb -U postgres -T template_postgis mapit
- "echo 'MAPIT_DB_NAME: mapit' > conf/general.yml"
- "echo 'MAPIT_DB_USER: postgres' >> conf/general.yml"
- "echo 'DJANGO_SECRET_KEY: secret' >> conf/general.yml"
- "echo 'COUNTRY: GB' >> conf/general.yml"
script:
- python -Wall manage.py test mapit mapit_gb