diff --git a/scripts/test-app.sh b/scripts/test-app.sh index 5957d2c..1640258 100755 --- a/scripts/test-app.sh +++ b/scripts/test-app.sh @@ -3,6 +3,11 @@ set -e ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. +if [ $CI == "true" ] && ([ -z $SAUCE_USERNAME ] || [ -z $SAUCE_ACCESS_KEY ]); then + echo "Skipping CI tests, because Saucelabs credentials are not set."; + exit 0; +fi + pushd $ROOT ./node_modules/.bin/mocha ./test/app-mocha-specs/test.js "$@" popd diff --git a/scripts/upload-artifact.sh b/scripts/upload-artifact.sh index 2a09267..d10758c 100755 --- a/scripts/upload-artifact.sh +++ b/scripts/upload-artifact.sh @@ -5,6 +5,11 @@ PLATFORM=$([[ "${@#--android}" = "$@" ]] && echo "ios" || echo "android") ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/.. TEMP=$ROOT/temp +if [ -z $SAUCE_USERNAME ] || [ -z $SAUCE_ACCESS_KEY ]; then + echo "Skipping uploading artifact, because Saucelabs credentials are not set."; + exit 0; +fi + if [ $PLATFORM = "android" ]; then curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \ -X POST \