forked from CartoDB/cartodb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (43 loc) · 2.14 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
before_install:
- lsb_release -a
- sudo mv /etc/apt/sources.list.d/pgdg-source.list* /tmp
- sudo apt-get -qq purge postgis* postgresql*
- sudo rm -Rf /var/lib/postgresql /etc/postgresql
- sudo apt-add-repository --yes ppa:cartodb/postgresql-9.3
- sudo apt-add-repository --yes ppa:cartodb/gis
- sudo apt-get update
- sudo apt-get install gdal-bin libgdal1-dev python-gdal
- sudo apt-get install postgresql-9.3-postgis-2.1 postgresql-plpython-9.3
- sudo apt-get install postgis
- sudo apt-get install -q unp zip ruby1.9.3 ruby1.9.1-dev python-pip ruby-rspec libicu-dev
- sudo apt-get install postgresql-contrib-9.3
- echo -e "local\tall\tall\ttrust\nhost\tall\tall\t127.0.0.1/32\ttrust\nhost\tall\tall\t::1/128\ttrust" |sudo tee /etc/postgresql/9.3/main/pg_hba.conf
- sudo service postgresql restart
- sudo su postgres -c "createdb template_postgis"
- echo "SELECT VERSION();" | sudo su postgres -c "psql template_postgis"
- sudo su postgres -c "psql -f /usr/share/postgresql/9.3/contrib/postgis-2.1/postgis.sql template_postgis"
- sudo su postgres -c "psql -f /usr/share/postgresql/9.3/contrib/postgis-2.1/spatial_ref_sys.sql template_postgis"
- sudo su postgres -c "echo 'SELECT POSTGIS_FULL_VERSION();' | psql template_postgis"
install:
- gdal-config --version
- ruby --version
- sudo gem install bundler
# http://stackoverflow.com/questions/10916784/error-installing-debugger-linecache-in-ruby-1-9-3
- gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p484/
- bundle install
- cp config/app_config.yml.testing config/app_config.yml
- cp config/database.yml.sample config/database.yml
# Needs fixing first some tests:
#- cp services/importer/spec/factories/database.json.sample services/importer/spec/factories/database.json
- cat python_requirements.txt | grep -v gdal | sudo pip install -r /dev/stdin
script:
- make prepare-test-db
- make check-prepared
# check list of database names
- sudo su postgres -c "echo 'select datname from pg_database;' | psql template_postgis"
env:
notifications:
irc:
channels:
- "irc.freenode.org#cartodb"
use_notice: true