-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.47 KB
/
run.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
44
45
46
47
48
49
50
51
name: Android Emulator Workflow
on:
push:
branches: [ "feature/emulator" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Install Android SDK
run: |
sudo apt-get update
sudo apt-get install -y wget unzip
wget -q "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip" -O android-sdk.zip
unzip -q android-sdk.zip -d $HOME/android-sdk
export ANDROID_HOME=$HOME/android-sdk
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH
echo "y" | sdkmanager --install "platform-tools"
echo "y" | sdkmanager --install "emulator"
echo "y" | sdkmanager --install "system-images;android-31;default;x86_64"
export PATH=$ANDROID_HOME/emulator:$PATH
- name: Start emulator
run: |
nohup emulator -avd testRunnner \
-skin 1080x1920 \
-no-snapshot \
-no-audio \
-no-boot-anim \
-accel auto \
-gpu auto \
-qemu -lcd-density 420 > /dev/null 2>&1 &
- name: Wait for emulator to be ready
run: adb wait-for-device
- name: List devices
run: adb devices