language: node_js
node_js:
  - "8"
  - "6"
  - "4"
before_install:
  - 'nvm install-latest-npm'
install:
  - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ] || [ "${TRAVIS_NODE_VERSION}" = "0.9" ]; then nvm install --latest-npm 0.8 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
script:
  - 'if [ -n "${LINT-}" ]; then npm run lint; fi'
  - 'if [ "${TEST-}" = true ]; then npm run test:only; fi'
env:
  global:
    - TEST=true
  matrix:
    - REACT=0.14
    - REACT=15.4
    - REACT=15
    - REACT=16
sudo: false
matrix:
  fast_finish: true
  include:
      env: LINT=true TEST=false
