dist: trusty

language: node_js

services:
  - couchdb

node_js:
  - "5"

sudo: true

addons:
  apt:
    packages:
      - couchdb
      - google-chrome-stable

script: npm run $COMMAND

before_install:
  - sudo add-apt-repository ppa:couchdb/stable -y

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - "npm install add-cors-to-couchdb"
  - "./node_modules/.bin/add-cors-to-couchdb"

env:
  matrix:
  # break into many small tests so travis doesn't complain
  - CLIENT=selenium:chrome SUITE=1 COMMAND=test
  - CLIENT=selenium:chrome SUITE=2 COMMAND=test
  - CLIENT=selenium:chrome SUITE=3 COMMAND=test
  - CLIENT=selenium:chrome SUITE=4 COMMAND=test
  - CLIENT=selenium:chrome SUITE=5 COMMAND=test
  - CLIENT=selenium:chrome SUITE=6 COMMAND=test
  - CLIENT=selenium:chrome SUITE=7 COMMAND=test
  - COMMAND=test-custom

branches:
  only:
  - master

dist: trusty

language: node_js

node_js:
  - "5"

sudo: true

addons:
  apt:
    packages:
      - google-chrome-stable

script: npm run $COMMAND

before_install:
  - sudo add-apt-repository ppa:couchdb/stable -y
  - sudo apt-get install couchdb

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - "npm install add-cors-to-couchdb"
  - "./node_modules/.bin/add-cors-to-couchdb"

env:
  matrix:
  # break into many small tests so travis doesn't complain
  - CLIENT=selenium:chrome SUITE=1 COMMAND=test
  - CLIENT=selenium:chrome SUITE=2 COMMAND=test
  - CLIENT=selenium:chrome SUITE=3 COMMAND=test
  - CLIENT=selenium:chrome SUITE=4 COMMAND=test
  - CLIENT=selenium:chrome SUITE=5 COMMAND=test
  - CLIENT=selenium:chrome SUITE=6 COMMAND=test
  - CLIENT=selenium:chrome SUITE=7 COMMAND=test
  - COMMAND=test-custom

branches:
  only:
  - master

Change how couchdb gets installed
Change how couchdb gets installed
