sudo: false
dist: trusty
language: node_js
node_js: stable

cache:
  directories:
    - node_modules

addons:
  firefox: latest
  google-chrome: latest

install:
  - npm install
  - polymer install --variants

before_script:
  - gulp lint
  - polymer lint --rules polymer-2-hybrid --input *.html
  - xvfb-run -s '-screen 0 1024x768x24' polymer test

script:
  - if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
      xvfb-run -s '-screen 0 1024x768x24' polymer test --env saucelabs;
    fi
  - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
      xvfb-run -s '-screen 0 1024x768x24' polymer test --env saucelabs-cron;
    fi

sudo: true
dist: trusty
language: node_js
node_js: stable

cache:
  directories:
    - node_modules

addons:
  firefox: latest
  google-chrome: latest

# Temporary fix, currently there are some weird timeout issues in Travis with Chrome 59
# TODO @limonte revisit after Chrome 60 release
before_install:
  - wget http://mirror.glendaleacademy.org/chrome/pool/main/g/google-chrome-stable/google-chrome-stable_58.0.3029.110-1_amd64.deb
  - sudo dpkg -i google-chrome*.deb

install:
  - npm install
  - polymer install --variants

before_script:
  - gulp lint
  - polymer lint --rules polymer-2-hybrid --input *.html
  - xvfb-run -s '-screen 0 1024x768x24' polymer test

script:
  - if [[ "$TRAVIS_EVENT_TYPE" != "pull_request" && "$TRAVIS_BRANCH" != quick/* ]]; then
      xvfb-run -s '-screen 0 1024x768x24' polymer test --env saucelabs;
    fi
  - if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
      xvfb-run -s '-screen 0 1024x768x24' polymer test --env saucelabs-cron;
    fi

Set Chrome version to 58 for Selenium tests
Set Chrome version to 58 for Selenium tests
