Android regression tests #14
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 Regression Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
APK_URL: | |
description: 'APK.tar.gz url to test' | |
type: string | |
required: true | |
# COMMIT_HASH: | |
# description: 'Commit of oxen-io/session-appium to checkout' | |
# type: string | |
# required: true | |
# push: | |
# branches: | |
# - test-docker-container | |
jobs: | |
run-tests-android: | |
runs-on: [self-hosted, linux, x64, qa-android] | |
steps: | |
- name: print APK to test | |
run: echo "APK_URL=${{ inputs.APK_URL }}" | |
- name: start container | |
run: docker run -d --privileged -it --device /dev/kvm -e NODE_CONFIG_ENV="ci" -e APK_TO_TEST_PATH="/session.apk" -p 8080:8080 android-emulator | |
- name: start emulators | |
run: | | |
sleep 10s | | |
docker exec --env APK_URL=${{ inputs.APK_URL }} $(docker ps -q) sh -c "/session-appium/docker/start_4_emus.sh" | |
- name: Sleep for 30s for the emulators to start | |
run: sleep 30s | |
shell: bash | |
- name: run tests in container | |
run: docker exec --env APK_URL=${{ inputs.APK_URL }} $(docker ps -q) sh -c "dl_and_test" | |
- name: stop container | |
if: always() | |
run: docker stop $(docker ps -q) |