language: node_js
addons:
  firefox: 'latest'
node_js:
  - '6.9'

install:
  - npm install
  - ./node_modules/.bin/mozilla-download ./firefox/ --product firefox --branch mozilla-aurora
  - 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
  matrix:
    - CI_ACTION="npm run test"
    - CI_ACTION="npm run dist"
    # - CI_ACTION="npm run lint"

branches:
  only:
    - master

cache:
  directories:
    - node_modules
