Merge pull request #18 from djrobstep/travis-config

Travis config
This commit is contained in:
djrobstep 2018-01-12 13:11:30 +11:00 committed by GitHub
commit 428d15f0fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View File

@ -12,6 +12,8 @@ services:
addons:
postgresql: "9.6"
before_script:
- bash install-postgres-10.sh
# command to install dependencies
install: make pip

16
install-postgres-10.sh Normal file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -ex
echo "Installing Postgres 10"
sudo service postgresql stop
sudo apt-get remove -q 'postgresql-*'
sudo apt-get update -q
sudo apt-get install -q postgresql-10 postgresql-client-10
sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
echo "Restarting Postgres 10"
sudo service postgresql restart
sudo psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres
sudo psql -c 'CREATE DATABASE travis;' -U postgres
sudo psql -c 'ALTER DATABASE travis OWNER TO travis;' -U postgres