Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android e2e workflow improvements #1910

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 17 additions & 14 deletions .github/workflows/test-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 8

- name: Download artifacts
uses: actions/download-artifact@v4
Expand All @@ -75,20 +75,23 @@ jobs:
maestro --help
maestro --version

- name: Start emulator and run a Flow
uses: reactivecircus/android-emulator-runner@v2
- name: Set up Android SDK
uses: malinskiy/action-android/install-sdk@release/cmdlinetoolsversion
with:
cmdlineToolsVersion: 8.0
# url: https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip
# url: https://dl.google.com/android/repository/commandlinetools-linux-9123335_latest.zip # classFile version 61 (java17)
# url: https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
# Above URL points to Command Line Tools v8.0 - the last version compatible with Java 8
# Found via https://stackoverflow.com/a/75763391/7009800
# Another useful website: https://androidsdkmanager.azurewebsites.net/cmdline-tools.html

- uses: malinskiy/action-android/emulator-run-cmd@release/cmdlinetoolsversion
with:
api-level: ${{ env.EMULATOR_API_LEVEL }}
target: ${{ env.EMULATOR_TARGET }}
arch: ${{ env.EMULATOR_ARCH }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
working-directory: ${{ github.workspace }}/e2e
script: |
./download_apps
./install_apps
./run_tests
api: ${{ env.EMULATOR_API_LEVEL }}
tag: ${{ env.EMULATOR_TARGET }}
abi: ${{ env.EMULATOR_ARCH }}
cmd: all_e2e

- name: Upload ~/.maestro artifacts
uses: actions/upload-artifact@v4
Expand Down
10 changes: 10 additions & 0 deletions all_e2e
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env sh

set -eu

[ "$(basename "$PWD")" = "maestro" ] || { echo "must be run from maestro directory" && exit 1; }

cd ./e2e
./download_apps
./install_apps
./run_tests
Loading