sudo: required
dist: trusty
language: node_js
node_js: "stable"

addons:
  hosts:
    - travis.dev

notifications:
  email: false

before_install:
  # Console
  - stty cols 80

script:
  # Main repo
  - if [ $TRAVIS_PULL_REQUEST = "false" ]; then npm run test-remote; fi
  # Forks (Travis blocks encrypted environment variables, so no remote tests)
  - if [ $TRAVIS_PULL_REQUEST != "false" ]; then npm test; fi

after_success:
  - bash <(curl -s https://codecov.io/bash) -e TRAVIS_NODE_VERSION

sudo: required
dist: trusty
language: node_js
node_js: "stable"

addons:
  chrome: stable
  hosts:
    - travis.dev

notifications:
  email: false

before_install:
  # Console
  - stty cols 80
  # Chrome
  # - export CHROME_BIN=chromium-browser
  # - export DISPLAY=:99.0
  # - sh -e /etc/init.d/xvfb start
  - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &

script:
  # Main repo
  - if [ $TRAVIS_PULL_REQUEST = "false" ]; then npm run test; fi
  # Forks (Travis blocks encrypted environment variables, so no remote tests)
  - if [ $TRAVIS_PULL_REQUEST != "false" ]; then npm test; fi

after_success:
  - bash <(curl -s https://codecov.io/bash) -e TRAVIS_NODE_VERSION

Use headless Chrome for Travis+PRs
Use headless Chrome for Travis+PRs
