-
Notifications
You must be signed in to change notification settings - Fork 3
/
firebase.sh
executable file
·36 lines (28 loc) · 949 Bytes
/
firebase.sh
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
#!/usr/bin/env bash
URL="https://firebase.google.com/docs/test-lab/command-line"
APK="build/outputs/apk/debug/android-kotlin-magellan-debug.apk"
TESTAPK="build/outputs/apk/androidTest/debug/android-kotlin-magellan-debug-androidTest.apk"
TESTACTIVITY="com.wealthfront.magellan.kotlinsample.MainActivityTest"
PACKAGE="com.wealthfront.magellan.kotlinsample.test"
DEVICE_NEXUS6P="Nexus6,version=21,locale=en,orientation=portrait"
which gcloud || {
echo "Install and configure google-cloud-sdk first"
open "${URL}"
exit 1
}
cat <<'EOF'
$ gcloud init
$ gcloud firebase test android models list
EOF
gw assembleDebug assembleDebugAndroidTest
gcloud firebase test android run \
--type robo \
--app "$APK" \
--device model="$DEVICE_NEXUS6P" \
--timeout 90s \
--robo-directives
gcloud firebase test android run \
--type instrumentation \
--app "$APK" \
--test "$TESTAPK" \
--device model="$DEVICE_NEXUS6P"