2014-09-07 18:53:33 +00:00
|
|
|
#!/usr/bin/env bash
|
2017-10-05 16:09:39 +00:00
|
|
|
# usage: travis.sh before|after
|
2014-09-07 18:53:33 +00:00
|
|
|
|
2017-09-26 13:09:27 +00:00
|
|
|
if [ $1 == 'after' ]; then
|
|
|
|
|
2017-11-13 18:19:36 +00:00
|
|
|
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
|
|
|
|
|
2018-06-07 14:50:36 +00:00
|
|
|
if [[ ${RUN_E2E} == 1 && $(ls -A $TRAVIS_BUILD_DIR/screenshots) ]]; then
|
2018-06-11 16:59:59 +00:00
|
|
|
if [[ -z "${ARTIFACTS_KEY}" ]]; then
|
2019-03-19 11:14:42 +00:00
|
|
|
echo "Screenshots were not uploaded. Please run the e2e tests locally to see failures."
|
2018-06-11 16:59:59 +00:00
|
|
|
else
|
2019-03-19 11:14:42 +00:00
|
|
|
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
|
2018-06-11 16:59:59 +00:00
|
|
|
artifacts upload
|
|
|
|
fi
|
2018-06-07 14:50:36 +00:00
|
|
|
fi
|
2018-06-07 14:31:37 +00:00
|
|
|
|
2017-09-26 12:24:11 +00:00
|
|
|
fi
|