Skip to content

Commit 61b410d

Browse files
committed
Fixed mobileboost script
1 parent 7da6b24 commit 61b410d

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

.github/workflows/run-mobileboost-tests.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Run MobileBoost Tests on PR
22

33
on:
44
pull_request:
5-
types: [opened, synchronize, reopened]
5+
types: [opened, reopened]
66
workflow_dispatch:
77

88
jobs:
99
build-and-test:
10-
runs-on: ubuntu-latest
10+
runs-on: macos-latest
1111

1212
steps:
1313
- name: Check out repository code
@@ -23,11 +23,13 @@ jobs:
2323
java-version: ${{ env.JAVA_VERSION }}
2424

2525
- name: Build Android App
26-
run: ./gradlew assembleDebug
26+
run: ./gradlew Branch-SDK-TestBed:assembleDebug
2727

2828
- name: Upload APK to Mobile Boost and Run Tests
2929
run: |
30-
curl https://app.mobileboost.io/cli.sh | bash $PWD/app/build/outputs/apk/debug/app-debug.apk android
30+
curl -s https://app.mobileboost.io/cli.sh | tr -d '\r' | /bin/bash -s -- "$PWD/Branch-SDK-TestBed/build/outputs/apk/debug/Branch-SDK-TestBed-debug.apk" android
3131
env:
3232
API_ORG_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }}
33+
API_KEY: ${{ secrets.MOBILEBOOST_API_ORG_KEY }}
3334
TEST_TAGS: Android
35+
shell: bash

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ Branch-SDK-TestBed/gradlew.bat
2727

2828
Branch-SDK-TestBed/gradle/wrapper/gradle-wrapper.properties
2929

30-
.direnv
30+
.direnv
31+
.secrets

Branch-SDK-Automation-TestBed/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ android {
1717
}
1818
defaultConfig {
1919
applicationId "io.branch.branchandroiddemo"
20-
minSdk 21
20+
minSdk 23
2121
targetSdk 33
2222
versionCode 1
2323
versionName "1.0"

Branch-SDK-TestBed/src/main/java/io/branch/branchandroidtestbed/MainActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,13 @@ public void onClick(View v) {
451451
}
452452
});
453453

454+
findViewById(R.id.force_quit_btn).setOnClickListener(new OnClickListener() {
455+
@Override
456+
public void onClick(View v) {
457+
System.exit(0);
458+
}
459+
});
460+
454461
((ToggleButton) findViewById(R.id.tracking_cntrl_btn)).setOnCheckedChangeListener((buttonView, isChecked) -> {
455462
Branch.getInstance().disableTracking(isChecked, (trackingDisabled, referringParams, error) -> {
456463
if (trackingDisabled) {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
2+
3+
<path android:fillColor="@android:color/white" android:pathData="M13,3h-2v10h2L13,3zM17.83,5.17l-1.42,1.42C17.99,7.86 19,9.81 19,12c0,3.87 -3.13,7 -7,7s-7,-3.13 -7,-7c0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3,9.26 3,12c0,4.97 4.03,9 9,9s9,-4.03 9,-9c0,-2.74 -1.23,-5.18 -3.17,-6.83z"/>
4+
5+
</vector>

Branch-SDK-TestBed/src/main/res/layout/main_activity.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@
150150
android:drawableStart="@drawable/ic_baseline_settings_24"
151151
android:layout_marginBottom="20dp"
152152
android:text="Settings" />
153+
154+
<Button
155+
android:id="@+id/force_quit_btn"
156+
style="@style/testbed_button_style"
157+
android:drawableStart="@drawable/baseline_power_settings_new_24"
158+
android:layout_marginBottom="20dp"
159+
android:text="Force Quit App" />
160+
153161
</LinearLayout>
154162

155163
</ScrollView>

0 commit comments

Comments
 (0)