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

sudo: false
dist: trusty

addons:
  chrome: stable

cache: yarn

env:
  global:
    # See https://git.io/vdao3 for details.
    - JOBS=1
  matrix:
    - EMBER_TRY_SCENARIO=defaults
    - EMBER_TRY_SCENARIO=typescript-release
    - EMBER_TRY_SCENARIO=typescript-beta
    - EMBER_TRY_SCENARIO=ember-cli-release
    - EMBER_TRY_SCENARIO=ember-cli-beta

matrix:
  fast_finish: true

before_install:
  - bash ./is_md_only.sh && MD_ONLY=true && echo "Only .md files have changed!" || test true

install:
  - test $MD_ONLY && echo "Skipped!" || yarn install

script:
  - test $MD_ONLY && echo "Skipped!" || yarn lint:js
  # Usually, it's ok to finish the test scenario without reverting
  #  to the addon's original dependency state, skipping "cleanup".
  - test $MD_ONLY && echo "Skipped!" || yarn ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

# We build PRs, but don't trigger separate builds for the PR from the branch.
branches:
  only:
    - master

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

sudo: false
dist: trusty

addons:
  chrome: stable

cache: yarn

env:
  global:
    # See https://git.io/vdao3 for details.
    - JOBS=1
  matrix:
    - EMBER_TRY_SCENARIO=defaults
    - EMBER_TRY_SCENARIO=typescript-release
    - EMBER_TRY_SCENARIO=typescript-beta
    - EMBER_TRY_SCENARIO=ember-cli-release
    - EMBER_TRY_SCENARIO=ember-cli-beta

matrix:
  fast_finish: true
  allow_failures:
    - env: EMBER_TRY_SCENARIO=typescript-beta
    - env: EMBER_TRY_SCENARIO=ember-cli-beta

before_install:
  - bash ./is_md_only.sh && MD_ONLY=true && echo "Only .md files have changed!" || test true

install:
  - test $MD_ONLY && echo "Skipped!" || yarn install

script:
  - test $MD_ONLY && echo "Skipped!" || yarn lint:js
  # Usually, it's ok to finish the test scenario without reverting
  #  to the addon's original dependency state, skipping "cleanup".
  - test $MD_ONLY && echo "Skipped!" || yarn ember try:one $EMBER_TRY_SCENARIO --skip-cleanup

# We build PRs, but don't trigger separate builds for the PR from the branch.
branches:
  only:
    - master

Allow failures in beta scenarios
Allow failures in beta scenarios
