summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-08-29 16:13:49 -0400
committerJason Wray <jason@mapbox.com>2018-08-29 18:44:57 -0400
commitbe607245e73685e4a1ff6d459953d3375819a9f1 (patch)
tree62f2bd2fece63a853db28854c4b9ef8e15f5fcd9
parent65ae97613e4bdee42a9a4d830aa0cb5b32765ea9 (diff)
downloadqtlocation-mapboxgl-be607245e73685e4a1ff6d459953d3375819a9f1.tar.gz
[build] Skip Android device tests via commit message
- Add `[skip firebase]` anywhere in your commit message to avoid running Firebase tests for that commit. - Also skips if the commit message includes `[ios]`, `[macos]`, or `[ios, macos]`. - Only works if included in the most recent commit message.
-rw-r--r--circle.yml12
1 files changed, 10 insertions, 2 deletions
diff --git a/circle.yml b/circle.yml
index c66c45160e..a4f3949013 100644
--- a/circle.yml
+++ b/circle.yml
@@ -420,9 +420,17 @@ jobs:
- *save-ccache
- *save-gradle-cache
- run:
+ name: Check if Firebase should be skipped
+ command: |
+ SHOULD_SKIP=$( git log -1 | grep -i -E -e "\[(skip.firebase|firebase.skip)\]" -e "\[((i|mac)os)+(, (i|mac)os)?\]" )
+ if [ -n "${SHOULD_SKIP}" ]; then
+ echo "Skipping Firebase tests."
+ echo 'export SKIP_FIREBASE=1' >> $BASH_ENV
+ fi
+ - run:
name: Log in to Google Cloud Platform
command: |
- if [ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" ]; then
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" && -z "${SKIP_FIREBASE}" ]]; then
echo "${GCLOUD_SERVICE_ACCOUNT_JSON}" > secret.json
gcloud auth activate-service-account --key-file secret.json --project android-gl-native
rm secret.json
@@ -431,7 +439,7 @@ jobs:
name: Run instrumentation tests on Firebase
no_output_timeout: 1200
command: |
- if [ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" ]; then
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" && -z "${SKIP_FIREBASE}" ]]; then
gcloud firebase test android models list
gcloud firebase test android run --type instrumentation \
--app platform/android/MapboxGLAndroidSDKTestApp/build/outputs/apk/debug/MapboxGLAndroidSDKTestApp-debug.apk \