sudo: required
dist: trusty
addons:
  apt:
    sources:
      - google-chrome
    packages:
      - google-chrome-stable

language: node_js

node_js:
  - "6"
  - "7"

cache:
  yarn: true

bundler_args: --retry 5

before_install:
  - travis_retry yarn run global

install:
  - travis_retry yarn install

before_script:
  - travis_wait yarn run lint
  - travis_wait yarn run build
  - export CHROME_BIN=chromium-browser
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 3

script:
  - yarn run ci
  - cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
