---
language: node_js
node_js:
  # we recommend testing addons with the same minimum supported node version as Ember CLI
  # so that your addon works for all apps
  - "4"

sudo: false
dist: trusty

addons:
  chrome: stable

cache:
  directories:
    - $HOME/.npm

env:
  # we recommend new addons test the current and previous LTS
  # as well as latest stable release (bonus points to beta/canary)
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-lts-2.8
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-lts-2.12
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-release
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-beta
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-canary
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-default
  - TEST_SUITE=backend # node tests (node_tests dir)

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

before_install:
  - npm config set spin false
  - npm install -g npm@4
  - npm --version

script:
  - if [ "$TEST_SUITE" = "backend" ]; then npm test; fi
  - if [ "$TEST_SUITE" = "frontend" ]; then node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup; fi

---
language: node_js
node_js:
  # we recommend testing addons with the same minimum supported node version as Ember CLI
  # so that your addon works for all apps
  - "6"

sudo: false
dist: trusty

addons:
  chrome: stable

cache:
  directories:
    - $HOME/.npm

env:
  # we recommend new addons test the current and previous LTS
  # as well as latest stable release (bonus points to beta/canary)
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-lts-2.8
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-lts-2.12
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-release
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-beta
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-canary
  - TEST_SUITE=frontend EMBER_TRY_SCENARIO=ember-default
  - TEST_SUITE=backend # node tests (node_tests dir)

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

before_install:
  - npm config set spin false
  - npm install -g npm@4
  - npm --version

script:
  - if [ "$TEST_SUITE" = "backend" ]; then npm test; fi
  - if [ "$TEST_SUITE" = "frontend" ]; then node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO --skip-cleanup; fi

Update node version for ES6 use strict warning
Update node version for ES6 use strict warning
