-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.yml
43 lines (43 loc) · 1.75 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
version: 2
jobs:
build:
docker:
- image: cimg/android:2024.11.1-node # gcloud is baked into this image
auth:
username: tdrhq
password: $DOCKERHUB_PASSWORD # context / project UI env-var reference
steps:
- checkout
- run:
name: Build debug APK and release APK
command: |
./gradlew assembleDebug
./gradlew assembleAndroidTest
- run:
name: Store Google Service Account
command: echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json
- run:
name: Authorize gcloud and set config defaults
command: |
gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}
- run:
name: Test with Firebase Test Lab
command: >
cd ~/project && gcloud firebase test android run \
--app ./app/build/outputs/apk/staging/debug/app-staging-debug.apk \
--test ./app/build/outputs/apk/androidTest/staging/debug/app-staging-debug-androidTest.apk \
--results-bucket cloud-test-${GOOGLE_PROJECT_ID} \
--directories-to-pull /sdcard/Download \
--device-ids Pixel2 \
--os-version-ids 27 2>&1 | tee ~/firebase-output
- run:
name: Record to screenshotbot
command: |
curl https://screenshotbot.io/recorder.sh | sh
~/screenshotbot/recorder \
--channel shot-example-circleci-test \
--firebase-output ~/firebase-output \
--api-key ${SCREENSHOTBOT_API_KEY} \
--repo-url ${CIRCLE_REPOSITORY_URL} \
--api-secret ${SCREENSHOTBOT_API_SECRET}