From 3ef7c9f62eac6b1b15ee1a6b16827f21933ba029 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Mon, 8 Aug 2016 18:41:19 +0200 Subject: [PATCH] Run the tests against the right PG9.5 port --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2f21906..e54e2ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,16 +21,17 @@ before_install: - sudo apt-get -y --no-install-recommends install python-scikits-learn=0.14.1-3-cdb2 # Install postgres db and build deps - - dpkg -l | grep postgres # TODO: remove this line - sudo /etc/init.d/postgresql stop # stop travis default instance - sudo apt-get -y install postgresql-9.5 postgresql-server-dev-9.5 postgresql-plpython-9.5 postgresql-9.5-postgis-2.2 postgresql-9.5-postgis-scripts # configure it to accept local connections from postgres - echo -e "# TYPE DATABASE USER ADDRESS METHOD \nlocal all postgres trust\nlocal all all trust\nhost all all 127.0.0.1/32 trust" \ | sudo tee /etc/postgresql/9.5/main/pg_hba.conf - - sudo cat /etc/postgresql/9.5/main/postgresql.conf | grep ^port # TODO: remove this line - sudo /etc/init.d/postgresql restart 9.5 + # save the postgres port for later usage + - sudo cat /etc/postgresql/9.5/main/postgresql.conf | grep ^port | grep -oh '[0-9]*' > .pg95.port + script: - sudo make install - - make test + - PGPORT=$(cat .pg95.port) make test