Skip to content

Commit 0a127d3

Browse files
committed
Update emulator testing
1 parent 34834be commit 0a127d3

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ jobs:
8080
echo "ANDROID_AVD_HOME=${XDG_CONFIG_HOME:-$HOME}/.android/avd" >> $GITHUB_ENV
8181
fi
8282
83-
84-
- name: Android SDKs - list installed SDKs
85-
run: sdkmanager --list_installed
86-
8783
- name: Android SDKs - setup environment
8884
if: false
8985
run: yes y | sdkmanager --licenses > /dev/null
@@ -102,9 +98,10 @@ jobs:
10298

10399
- name: Android Emulator - Create
104100
run: |
105-
which sdkmanager
106-
sdkmanager --install "platform-tools" "platforms;android-34" "system-images;android-34;default;x86_64" "emulator"
107-
echo "no" | avdmanager create avd -n testing -k "system-images;android-34;default;x86_64" --device "pixel_6"
101+
which avdmanager
102+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --list_installed
103+
$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "system-images;android-${ANDROID_API};default;x86_64"
104+
echo "no" | avdmanager create avd -n testing -k "system-images;android-${ANDROID_API};default;x86_64" --device "${ANDROID_PROFILE}"
108105
$ANDROID_HOME/emulator/emulator -list-avds
109106
nohup emulator -memory 4096 -avd testing -wipe-data -no-window -no-snapshot -noaudio -no-boot-anim 2>&1 > emulator.log &
110107
@@ -114,9 +111,8 @@ jobs:
114111
#- name: Android - List AVDs
115112
# run: emulator -list-avds
116113

117-
- name: Android - Boot
118-
run: nohup emulator -memory 4096 -avd "${ANDROID_EMULATOR_NAME}" -wipe-data -no-window -no-snapshot -noaudio -no-boot-anim 2>&1 > emulator.log &
119-
114+
#- name: Android - Boot
115+
# run: nohup emulator -memory 4096 -avd "${ANDROID_EMULATOR_NAME}" -wipe-data -no-window -no-snapshot -noaudio -no-boot-anim 2>&1 > emulator.log &
120116

121117
- name: Install Prerequisites
122118
run: |
@@ -211,12 +207,6 @@ jobs:
211207
run: adb wait-for-any-device
212208
timeout-minutes: 5
213209

214-
- name: Pause briefly
215-
run: sleep 30
216-
217-
#- name: ADB Press Power Button
218-
# run: adb shell input keyevent 82
219-
220210
- name: Check Android Emulator
221211
run: |
222212
adb shell 'echo Hello Android!'

0 commit comments

Comments
 (0)