-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b160f0
commit ed6dd40
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Android Advanced CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Create sdcard folder | ||
run: mkdir -p /home/travis/sdcard/ | ||
- name: Create actual sdcard | ||
run: mksdcard -l baldphonesdcard 128M /home/travis/sdcard/sdcard.img | ||
- name: Create AVD | ||
run: echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a | ||
- name: Start AVD | ||
run: emulator -avd test -no-audio -no-window -camera-back none -camera-front none -no-boot-anim -sdcard /home/travis/sdcard/sdcard.img -no-snapshot-save & | ||
- name: Wait for the emulator to boot up | ||
run: android-wait-for-emulator | ||
- name: Remove window animations | ||
run: adb shell settings put global window_animation_scale 0 & | ||
- name: Remove transition animations | ||
run: adb shell settings put global transition_animation_scale 0 & | ||
- name: Remove other animations | ||
run: adb shell settings put global animator_duration_scale 0 & | ||
- name: Disable original launcher | ||
run: adb shell pm disable com.android.launcher | ||
- name: Build BaldUpdatedDebug flavour | ||
run: ./gradlew assemblebaldUpdatesDebug | ||
- name: Install BaldPhone | ||
run: ./gradlew installbaldUpdatesDebug | ||
- name: Activate BaldNotificationListener | ||
run: adb shell settings put secure enabled_notification_listeners %nlisteners:com.bald.uriah.baldphone/com.bald.uriah.baldphone.services.NotificationListenerService | ||
- name: Activate BaldKeyboard | ||
run: adb shell ime enable com.bald.uriah.baldphone/.keyboard.BaldInputMethodService | ||
- name: Set BaldKeyboard as the current Keyboard | ||
run: adb shell ime set com.bald.uriah.baldphone/.keyboard.BaldInputMethodService | ||
- name: Send an input | ||
run: adb shell input keyevent 82 & | ||
- name: Run tests | ||
run: ./gradlew connectedbaldUpdatesDebugAndroidTest | ||
|
||
|