diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-08 15:37:58 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-10 15:20:22 +0200 |
commit | 6e67ff13344b465a513cfdb47c978d3cf22b305a (patch) | |
tree | 34ac5dd5d21a24eeb5452f14604e63c6b74a87e3 | |
parent | dbd180d89696f09bae84a4c4e67649241f897142 (diff) | |
download | qtlocation-mapboxgl-upstream/jmalanen-android-unit-test.tar.gz |
[build] Run Android unit test on Firebaseupstream/jmalanen-android-unit-test
-rw-r--r-- | circle.yml | 35 |
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: |