language: node_js
node_js:
  - 0.10
  - 0.8
services:
  - redis-server
before_script:
  - psql -c 'create database "tomatar-test";' -U postgres
  - psql -f ./config/tables.sql -U postgres -d tomatar-test
  - npm install --quiet -g karma
  - npm install -g grunt-cli
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 1
script:
  - karma start config/karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
  - NODE_ENV=test grunt cafemocha

language: node_js
node_js:
  - 0.10
  - 0.8
services:
  - redis-server
before_script:
  - sudo /etc/init.d/postgresql stop
  - sudo cp /etc/postgresql/9.1/main/pg_hba.conf ./
  - sudo apt-get remove postgresql postgresql-9.1 -qq --purge
  - source /etc/lsb-release
  - echo "deb http://apt.postgresql.org/pub/repos/apt/ $DISTRIB_CODENAME-pgdg main" > pgdg.list
  - sudo mv pgdg.list /etc/apt/sources.list.d/
  - wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -
  - sudo apt-get update
  - sudo apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install postgresql-9.3 postgresql-contrib-9.3 -qq
  - sudo /etc/init.d/postgresql stop
  - sudo cp ./pg_hba.conf /etc/postgresql/9.3/main
  - sudo /etc/init.d/postgresql start
  - psql -c 'create database "tomatar-test";' -U postgres
  - psql -f ./config/tables.sql -U postgres -d tomatar-test
  - npm install --quiet -g karma
  - npm install -g grunt-cli
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 1
script:
  - karma start config/karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
  - NODE_ENV=test grunt cafemocha

Install Postgresql 9.3 on Travis
Install Postgresql 9.3 on Travis
