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

sudo: required
dist: trusty

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

cache:
  directories:
    - node_modules

env:
  - EMBER_TRY_SCENARIO=default
  - 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"
  - export PATH=/usr/local/phantomjs-2.0.0/bin:$PATH
  - "mkdir travis-phantomjs21"
  - "wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/phantomjs-2.1-linux-x86_64.tar.bz2"
  - "tar -xvf $PWD/phantomjs-2.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs21 --strip-components 2 phantomjs-2.1.1-linux-x86_64/bin/phantomjs"
  - "export PATH=$PWD/travis-phantomjs21:$PATH"
  - phantomjs --version
  - "npm install -g npm@^3"
  - "npm config set progress false"

install:
  - npm install -g bower
  - npm install
  - bower install

script:
  - ember try $EMBER_TRY_SCENARIO test

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

sudo: required
dist: trusty

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

cache:
  directories:
    - node_modules

env:
  - EMBER_TRY_SCENARIO=default
  - 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 install -g npm@^3"
  - "npm config set progress false"
  - "npm install phantomjs-prebuilt"
  - "phantomjs --version"

install:
  - npm install -g bower
  - npm install
  - bower install

script:
  - ember try $EMBER_TRY_SCENARIO test

Use phantomjs-prebuilt instead of downloading from bitbucket.
Use phantomjs-prebuilt instead of downloading from bitbucket.

Bitbucket rate limits, using the `npm` package avoids hitting the rate
limit.
