language: node_js

node_js:
  - '6'
  - '5'
  - '4'

# fail asap when there is a failure
matrix:
  fast_finish: true

before_install:
  # https://yarnpkg.com/en/docs/install-ci#travis-tab
  # Repo for newer Node.js versions
  - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  # Repo for Yarn
  - sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
  - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq yarn

# cache node modules
cache:
  directories:
    # yarn
    - $HOME/.yarn-cache
    # phenomic
    - node_modules
    - docs/node_modules
    - themes/phenomic-theme-base/node_modules
    - test-setup/node_modules

install: yarn

script:
  - yarn run test
  - yarn run docs-webpack-2-test
  - yarn run docs-webpack-2-reset && yarn run docs # reset cache

after_success: yarn run coverage

# for Yarn, to build some native deps

env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8

language: node_js

node_js:
  - '6'
  - '5'
  - '4'

# fail asap when there is a failure
matrix:
  fast_finish: true

before_install:
  # https://yarnpkg.com/en/docs/install-ci#travis-tab
  # Repo for newer Node.js versions
  - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  # Repo for Yarn
  - sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
  - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq yarn

# cache node modules
cache:
  directories:
    # yarn
    - $HOME/.yarn-cache
    # phenomic
    - node_modules
    - docs/node_modules
    - themes/phenomic-theme-base/node_modules
    - test-setup/node_modules

install: yarn

script: yarn run test

after_success: yarn run coverage

# for Yarn, to build some native deps

env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8

Disable webpack 2 test on Travis
Disable webpack 2 test on Travis
