matrix:
  include:
    - os: linux
      language: node_js
      node_js: 8.9.3
      dist: trusty
      sudo: required
      addons:
        chrome: stable

before_install:
  - if [ "$TRAVIS_OS_NAME" == "linux"  ]; then
    export DISPLAY=:99.0;
    sh -e /etc/init.d/xvfb start;
    fi

install:
  - yarn install --network-timeout 1000000 # Timeout needed for Windows (really slow)

script:
  - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then yarn checkformat --head=$TRAVIS_PULL_REQUEST_SHA --base=$(git merge-base HEAD $TRAVIS_BRANCH); fi'
  - yarn test
  - yarn e2e
  - yarn checkcommit
  - yarn documentation

notifications:
  email: false
  webhooks:
    on_success: true
    on_failure: true
    on_start: true
