From 25c3480a5e1362ac48818e945653502701af087b Mon Sep 17 00:00:00 2001 From: tminglei Date: Sat, 19 May 2018 19:44:41 +0800 Subject: [PATCH] update .travis.yml --- .travis.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3cf76849..ff138d17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,21 @@ scala: - 2.12.6 jdk: - oraclejdk8 -services: - - postgresql -addons: - postgresql: "9.4" +before_install: + - sudo /etc/init.d/postgresql stop + - sudo apt-get -y remove --purge postgresql-9.1 + - sudo apt-get -y remove --purge postgresql-9.2 + - sudo apt-get -y remove --purge postgresql-9.3 + - sudo apt-get -y remove --purge postgresql-9.4 + - sudo apt-get -y remove --purge postgresql-9.5 + - sudo apt-get -y autoremove + - sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 7FCC7D46ACCC4CF8 + - sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main 9.6" >> /etc/apt/sources.list.d/postgresql.list' + - sudo apt-get update + - sudo apt-get -y install postgresql-9.6 postgresql-contrib-9.6 postgresql-9.6-postgis-2.3 + - sudo sh -c 'echo "local all postgres trust" > /etc/postgresql/9.6/main/pg_hba.conf' + - sudo sh -c 'echo -n "host all all 127.0.0.1/32 trust" >> /etc/postgresql/9.6/main/pg_hba.conf' + - sudo service postgresql restart 9.6 before_script: - psql -c 'create database test;' -U postgres - psql test -c 'CREATE EXTENSION IF NOT EXISTS hstore;' -U postgres