language: node_js
addons:
  firefox: 'latest'
node_js:
  - '6.9.2'

install:
  - npm install
  - ./node_modules/.bin/mozilla-download ./firefox/ --product firefox --branch mozilla-central
  - export FIREFOX_NIGHTLY_BIN="./firefox/firefox/firefox-bin"

before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

script:
  - $CI_ACTION

env:
  global:
    - TEST_SUITE=unit
    - CXX=g++-4.8
  matrix:
    - CI_ACTION="npm run test:ci"
    - CI_ACTION="npm run build"
    - CI_ACTION="npm run lint"

cache:
  directories:
    - node_modules

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - g++-4.8
