language: node_js

node_js:
  - "4.7.3"

addons:
  firefox: "48.0.1"

services:
  - selenium

build:
  ci:
    - "wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -"
    - "sudo sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google-chrome.list'"
    - "curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -"
    - "echo \"deb http://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list"
    - sudo apt-get update
    - sudo apt-get install google-chrome-stable yarn
    - "export PATH=$PATH:$(yarn global bin)"
    - yarn
    - "export DISPLAY=:99.0"
    - xvfb-run npm test
  cache: true

branches:
  only:
    - master
