language: node_js

node_js:
  - "0.11"
  - "0.10"

branches:
  only:
    - master

before_script:
  - npm install -g istanbul
  - npm install coveralls
  - npm install mocha-lcov-reporter

after_script:
  - NODE_ENV=test istanbul cover
    ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec &&
    cat ./coverage/lcov.info |
    ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage