Docs: Detail local testing prerequisites and steps in README.md #1
Workflow file for this run
This file contains hidden or 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 Selenium Java | |
| on: | |
| push: | |
| paths: | |
| - 'android-selenium-java/**' | |
| - '.github/workflows/android-selenium-java.yml' | |
| pull_request: | |
| paths: | |
| - 'android-selenium-java/**' | |
| - '.github/workflows/android-selenium-java.yml' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: maven | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: android-selenium-java/package-lock.json | |
| - name: Enable KVM group permissions | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Install Appium | |
| run: | | |
| npm install -g appium@latest | |
| appium driver install uiautomator2 | |
| - name: Run tests on Android Emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 29 | |
| target: google_apis | |
| arch: x86_64 | |
| force-avd-creation: true | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| script: appium --allow-insecure uiautomator2:chromedriver_autodownload > appium.log 2>&1 & i=0; while [ $i -lt 60 ]; do if curl -s http://127.0.0.1:4723/status > /dev/null; then break; fi; sleep 1; i=$((i+1)); done; mvn -B test --file android-selenium-java/pom.xml | |
| - name: Upload logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: logs | |
| path: | | |
| appium.log | |
| android-selenium-java/target/surefire-reports/ |