---
language: node_js
node_js:
  - "6"

sudo: false

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

env:
  matrix:
    - 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
    - EMBER_TRY_SCENARIO=ember-default

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

before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash
  - export PATH=$HOME/.yarn/bin:$PATH
  - yarn global add phantomjs-prebuilt
  - phantomjs --version

install:
  - yarn install --no-lockfile

script:
  # We need to cleanup, since our deploy depends on the git repo's status
  - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test

after_success:
  - node_modules/.bin/ember deploy production

---
language: node_js
node_js:
  - "6"

sudo: false

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

env:
  matrix:
    - 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
    - EMBER_TRY_SCENARIO=ember-default

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

before_install:
  # Locking to Yarn 1.0.2 to work around https://github.com/yarnpkg/yarn/issues/4612
  - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.0.2
  - export PATH=$HOME/.yarn/bin:$PATH
  - yarn global add phantomjs-prebuilt
  - phantomjs --version

install:
  - yarn install --no-lockfile

script:
  # We need to cleanup, since our deploy depends on the git repo's status
  - node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO test

after_success:
  - node_modules/.bin/ember deploy production

Work around Yarn 1.1.0 bug in Travis
Work around Yarn 1.1.0 bug in Travis
