android-emulator-runner
android-emulator-runner copied to clipboard
Question - How to load apk on Android Emulator from pipeline
I'd like to know how can I add the .apk on the emulator device from the pipeline, thank you!
name: Appium CI - Android on: [ push ]
jobs: Automate: runs-on: macos-latest strategy: matrix: api-level: [28] #22, 25, include: - EMULATOR_API: 28 EMULATOR_ARCH: x86_64 #- EMULATOR_API: 25 # EMULATOR_ARCH: x86 #- EMULATOR_API: 22 # EMULATOR_ARCH: x86 steps: - uses: actions/checkout@v2 - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: java-version: 1.8
- uses: actions/setup-node@v2
with:
node-version: '12'
- run: |
npm install -g [email protected]
appium -v
appium &>/dev/null &
- name: Execute emulator tests
timeout-minutes: 30
uses: reactivecircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.EMULATOR_ARCH }}
disable-animations: true
profile: Nexus 6
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back none -camera-front none -gpu swiftshader_indirect
script: mvn package
- uses: actions/setup-node@v2
with:
node-version: '12'
- run: |
npm install -g [email protected]
appium -v
appium &>/dev/null &
- name: Execute emulator tests
timeout-minutes: 30
uses: reactivecircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.EMULATOR_ARCH }}
disable-animations: true
profile: Nexus 6
emulator-options: -no-snapshot -no-window -no-boot-anim -camera-back none -camera-front none -gpu swiftshader_indirect
script: adb install <package-location> && mvn package
Yes, to clarify:
- Generate api from previous job or separate workflow.
- Archive and Upload the APK
- Download APK using an action
- adb install the APK from location you downloaded it
- run tests in script portion after installation
Can use script: |
and pipe it all below in the emulator action.