language: node_js
node_js:
  - 6
sudo: required
env:
  - NODE_ENV=test
addons:
  rethinkdb: '2.3.5'
  apt:
    packages:
      - oracle-java8-installer
      - oracle-java8-set-default
before_script:
  - npm run start:rethinkdb
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start
  - rethinkdb --bind all --http-port 9090 & # start rethinkdb on background process
after_success:
  - npm run coveralls
  - npm run build && npm run e2e

language: node_js
node_js:
  - 6
sudo: required
env:
  - NODE_ENV=test
addons:
  rethinkdb: '2.3.5'
  apt:
    packages:
      - oracle-java8-installer
      - oracle-java8-set-default
before_script:
  - npm run start:rethinkdb
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start
  - rethinkdb & # start rethinkdb on background process
after_success:
  - npm run coveralls
  - npm run build && npm run e2e

Use background process for rethinkdb.
Use background process for rethinkdb.
