travis.sh
#!/bin/sh
echo "DEBUG ENV: ${TRAVIS_JOB_NUMBER} ${TRAVIS_BUILD_NUMBER} ..."
if [ "${TRAVIS_BUILD_NUMBER}.1" != "${TRAVIS_JOB_NUMBER}" ]; then
echo "Only run sauce labs 1 time 1 commit... quit."
exit 0
fi
if [ "${TRAVIS_REPO_SLUG}" != "zordius/webtasks" ]; then
echo "Skip deploy because this is a fork... quit."
exit 0
fi
# push coverage to codeclimate
npm install codeclimate-test-reporter
npm run-script coverage
node_modules/.bin/codeclimate < coverage/lcov.info