Merge pull request #20439 from woocommerce/update/improve-e2e-screenshots

Only try to upload screenshots if directory is not empty
This commit is contained in:
Rodrigo Primo 2018-06-08 09:34:45 -03:00 committed by GitHub
commit c2616b74f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -26,7 +26,9 @@ if [ $1 == 'after' ]; then
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
fi
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
artifacts upload
if [[ ${RUN_E2E} == 1 && $(ls -A $TRAVIS_BUILD_DIR/screenshots) ]]; then
curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash
artifacts upload
fi
fi