init commit #30
Workflow file for this run
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
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 |