summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuha Alanen <juha.alanen@mapbox.com>2020-01-08 15:37:58 +0200
committerJuha Alanen <juha.alanen@mapbox.com>2020-01-10 17:19:30 +0200
commit94df7ffc2deb4b87df93b2cc1dcc391a1eb44785 (patch)
treee96a30359518eb1a84d8d3b5063b0b3676050f58
parentc7c441167dbea2adf6928790a8c09c57b79b1c2b (diff)
downloadqtlocation-mapboxgl-94df7ffc2deb4b87df93b2cc1dcc391a1eb44785.tar.gz
[build] Run Android unit test on Firebase
-rw-r--r--circle.yml35
1 files changed, 35 insertions, 0 deletions
diff --git a/circle.yml b/circle.yml
index 96575c9781..906d320f4f 100644
--- a/circle.yml
+++ b/circle.yml
@@ -8,6 +8,7 @@ workflows:
- next-android-benchmark-runner
- next-android-api-breakage
- next-android-render-test-runner
+ - next-android-unit-test-runner
- next-baselines:
requires:
- next-android-arm64-v8a-release
@@ -717,6 +718,40 @@ jobs:
name: Build SDK
command: BUILDTYPE=Release make android-arm-v8
- next-save
+ next-android-unit-test-runner:
+ executor: ubuntu-disco
+ steps:
+ - checkout
+ - next-prepare
+ - run:
+ name: Build UnitTestRunner APK
+ command: |
+ cd test/android
+ ./gradlew --parallel --max-workers=8 -Pmapbox.abis=arm64-v8a app:assembleRelease app:assembleAndroidTest
+ - login-google-cloud-platform
+ - run:
+ name: Run UnitTestRunner on Firebase
+ no_output_timeout: 20m
+ command: |
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" && -z "${SKIP_FIREBASE:-}" ]]; then
+ gcloud firebase test android models list
+ gcloud firebase test android run --type instrumentation \
+ --app test/android/app/build/outputs/apk/release/app-release.apk \
+ --test test/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk \
+ --device-ids flame --os-version-ids 29 --locales en --orientations portrait --timeout 20m \
+ --directories-to-pull /sdcard/test/results --results-dir unit-test-${CIRCLE_BUILD_NUM} \
+ --no-record-video --no-performance-metrics
+ fi
+ - run:
+ name: Retrieve Test Result from gcloud
+ when: always
+ command: |
+ if [[ -n "${GCLOUD_SERVICE_ACCOUNT_JSON}" && -z "${SKIP_FIREBASE:-}" ]]; then
+ testResult=$(gsutil ls gs://test-lab-186672a0qp5bq-ycr70axads3nc/unit-test-${CIRCLE_BUILD_NUM}/**/results/results.xml)
+ mkdir -p /tmp/tests/unit-test
+ gsutil cp $testResult /tmp/tests/unit-test
+ fi
+ - next-save
next-android-render-test-runner:
executor: ubuntu-disco
steps: