Create gmsaas_spike.yml #2
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: GMSaaS Test | |
on: | |
push: | |
branches: [ main ] | |
paths: [ '.github/**', 'android/**' ] | |
pull_request: | |
branches: [ main ] | |
paths: [ '.github/**', 'android/**' ] | |
release: | |
types: [ published ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- api-level: 27 | |
recipe_uuid: ea5fda48-fa8b-48c1-8acc-07d910856141 # Pixel XL, Android 8.1 (API 27) | |
# fb936099-d261-4dd3-8dec-3fc14f1d0f03 # Pixel 3a, Android 9.0 (API 28) | |
# 4c015ada-e64e-4f5d-a320-06cbf6e95648 # Pixel 3a, Android 10 (API 29) | |
# 95016679-8f8d-4890-b026-e4ad889aadf1 # Pixel 3a, Android 11 (API 30) | |
# see here for more recipes: https://support.genymotion.com/hc/en-us/articles/360007473658-Supported-Android-devices-templates-for-Genymotion-Cloud-SaaS | |
steps: | |
# Setup | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9.16" | |
architecture: "x64" | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
# Caching | |
- name: Gradle cache | |
uses: gradle/actions/setup-gradle@v3 | |
# Create Genymotion instance | |
- name: Start Genymotion Cloud SaaS instance | |
uses: genymobile/[email protected] | |
with: | |
email: ${{ secrets.GMSAAS_EMAIL }} | |
password: ${{ secrets.GMSAAS_PASSWORD }} | |
recipe_uuid: ${{ matrix.recipe_uuid }} | |
# Run the tests | |
- name: Run Android Integration Tests | |
run: | | |
cd android | |
echo tralala > tralala.txt | |
emulator -writable-system | |
adb shell am broadcast -a android.intent.action.CLOSE_SYSTEM_DIALOGS | |
adb root 2> /dev/null | |
adb remount | |
adb push tralala.txt "/product/etc/permissions/" | |
adb shell "mount -o remount,ro /" |