language: node_js
node_js:
  - "7"
  - "6"
  - "5"
  - "4"
  - "iojs"
  - "0.12"
  - "0.11"
  - "0.10"
  - "0.9"
  - "0.8"
  - "0.6"
  - "0.4"
before_install:
  - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi'
  - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi'
script:
  - 'if [ -n "${LINT-}" ]; then npm run lint ; fi'
  - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi'
  - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi'
sudo: false
env:
  - TEST=true
matrix:
  fast_finish: true
  include:
    - node_js: "node"
      env: LINT=true
  allow_failures:
    - node_js: "0.11"
    - node_js: "0.9"
    - node_js: "0.6"
    - node_js: "0.4"
