sudo: false
language: node_js
node_js: node
before_install:
- ./firefox-allow-popups.sh
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- |
    if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^docs)/'
    then
      echo "Only docs were updated, skipping tests."
      exit
    fi
script: npm run ci
before_script:
  - npm run http-server &
  - sleep 2
addons:
  sauce_connect: true
  firefox: "51.0"
