---
language: node_js
node_js:
  - "stable"

dist: trusty
sudo: required

addons:
  apt:
    sources:
    - google-chrome
    packages:
    - google-chrome-stable

cache:
  directories:
    - node_modules
    - $HOME/.npm
    - $HOME/.cache # includes bowers cache
    - $HOME/.yarn-cache

env:
  - EMBER_TRY_SCENARIO=ember-default
#  - EMBER_TRY_SCENARIO=ember-1.13
  - EMBER_TRY_SCENARIO=ember-lts-2.4
  - EMBER_TRY_SCENARIO=ember-lts-2.8
  - EMBER_TRY_SCENARIO=ember-release
  - EMBER_TRY_SCENARIO=ember-beta
  - EMBER_TRY_SCENARIO=ember-canary

matrix:
  fast_finish: true
  allow_failures:
    - env: EMBER_TRY_SCENARIO=ember-canary

before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - npm config set spin false
  - npm install -g bower yarn

install:
  - yarn install
  - bower install

script:
  # Usually, it's ok to finish the test scenario without reverting
  #  to the addon's original dependency state, skipping "cleanup".
  - node node_modules/ember-cli/bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup

---
language: node_js
node_js:
  - "stable"

dist: trusty
sudo: required

addons:
  apt:
    sources:
    - google-chrome
    packages:
    - google-chrome-stable

cache:
  yarn: true
  directories:
    - node_modules
    - $HOME/.npm
    - $HOME/.cache # includes bowers cache
    - $HOME/.yarn-cache

env:
  - EMBER_TRY_SCENARIO=ember-default
#  - EMBER_TRY_SCENARIO=ember-1.13
  - EMBER_TRY_SCENARIO=ember-lts-2.4
  - EMBER_TRY_SCENARIO=ember-lts-2.8
  - EMBER_TRY_SCENARIO=ember-release
  - EMBER_TRY_SCENARIO=ember-beta
  - EMBER_TRY_SCENARIO=ember-canary

matrix:
  fast_finish: true
  allow_failures:
    - env: EMBER_TRY_SCENARIO=ember-canary

before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - npm config set spin false
  - npm install -g bower yarn

install:
  - yarn install
  - bower install

script:
  # Usually, it's ok to finish the test scenario without reverting
  #  to the addon's original dependency state, skipping "cleanup".
  - node node_modules/ember-cli/bin/ember try:one $EMBER_TRY_SCENARIO test --skip-cleanup

Add Yarn cache option to Travis config
Add Yarn cache option to Travis config
