language: node_js
node_js:
  - "0.6"
  - "0.8"
  - "0.10"
  - "0.12"
  - "1.8"
  - "2.5"
  - "3.3"
  - "4.2"
  - "5.4"
sudo: false
before_install:
  # Setup Node.js version-specific dependencies
  - test $TRAVIS_NODE_VERSION != '0.6' || npm rm --save-dev istanbul
  - test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul
script:
  # Run test script, depending on istanbul install
  - "test ! -z $(npm -ps ls istanbul) || npm test"
  - "test   -z $(npm -ps ls istanbul) || npm run-script test-ci"
after_script:
  - "test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
