woocommerce/tests/bin/travis.sh

23 lines
646 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2017-10-05 16:09:39 +00:00
# usage: travis.sh before|after
2017-09-26 13:09:27 +00:00
if [ $1 == 'after' ]; then
if [[ ${RUN_CODE_COVERAGE} == 1 ]]; then
2017-09-26 13:09:27 +00:00
bash <(curl -s https://codecov.io/bash)
2017-09-26 14:21:05 +00:00
wget https://scrutinizer-ci.com/ocular.phar
2017-10-05 16:09:39 +00:00
chmod +x ocular.phar
2017-09-26 14:21:05 +00:00
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
2017-09-26 12:24:11 +00:00
fi
if [[ ${RUN_E2E} == 1 && $(ls -A $TRAVIS_BUILD_DIR/screenshots) ]]; then
if [[ -z "${ARTIFACTS_KEY}" ]]; then
echo "Screenshots were not uploaded. Please run the e2e tests locally to see failures."
else
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
artifacts upload
fi
fi
2017-09-26 12:24:11 +00:00
fi