Skip to content

setup node js, android sdk #2

setup node js, android sdk

setup node js, android sdk #2

Workflow file for this run

name: Appium setup
on:
push:
branches:
- main
jobs:
appium_test:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.REPO_GIT_TOKEN }}
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Set up NodeJS 18
uses: actions/setup-node@v4
with:
node-version: '18.19.0'
# Run Android Emulator
- name: Run Android Emulator
run: |
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;android-28;google_apis;x86_64'
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n test_device -k 'system-images;android-28;google_apis;x86_64' --force
echo $ANDROID_HOME/emulator/emulator -list-avds
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd test_device -no-snapshot > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
# Use HTTPS repos
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.19.4'
channel: 'stable'
- run: flutter --version
- name: Install flutter dependencies
run: flutter pub get
- name: Install and Run Appium Server
uses: moatazeldebsy/[email protected]