language: node_js
node_js:
  - "5"
services:
  - postgresql
install:
  - npm install
script:
 - npm test
 - npm run integration

addons:
  postgresql: "9.4"
language: node_js
node_js:
  - "5"
services:
  - postgresql
install:
  - npm install
script:
 - npm test
 - npm run integration

sudo: required

env:
  global:
  - NODE_ENV=test
  - PGPORT=5432
  - PGHOST=localhost

addons:
  apt:
    sources:
    - precise-pgdg-9.5
    packages:
    - postgresql-9.5
    - postgresql-contrib-9.5
  postgresql: 9.5

before_script:
  - sudo cp /etc/postgresql/9.4/main/pg_hba.conf /etc/postgresql/9.5/main/pg_hba.conf
  - sudo /etc/init.d/postgresql restart

Change postgresql version for Travis
Change postgresql version for Travis
