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

Make Maestro run for each PR push #4121

Merged
merged 1 commit into from
Jan 13, 2025
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true --no-configuration-cache

jobs:
debug:
build:
name: Build APKs
runs-on: ubuntu-latest
strategy:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/maestro-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ name: Maestro (local)
# Run this flow only when APK Build workflow completes
on:
workflow_dispatch:
workflow_run:
workflows: [APK Build]
types:
- completed
pull_request:

# Enrich gradle.properties for CI/CD
env:
Expand All @@ -21,7 +18,6 @@ jobs:
build-apk:
name: Build APK
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch'
# Allow one per PR.
concurrency:
group: ${{ format('maestro-{0}', github.ref) }}
Expand Down Expand Up @@ -61,8 +57,6 @@ jobs:
name: Maestro test suite
runs-on: ubuntu-latest
needs: [build-apk]
# Only if the APKs were built successfully.
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
# Allow one per PR.
concurrency:
group: ${{ format('maestro-{0}', github.ref) }}
Expand All @@ -74,16 +68,8 @@ jobs:
# Ensure we are building the branch and not the branch after being merged on develop
# https://github.com/actions/checkout/issues/881
ref: ${{ github.ref }}
- name: Download APK artifact from 'Build APKs' flow
uses: actions/download-artifact@v4
if: github.event.workflow_run.conclusion == 'success'
with:
name: elementx-apk-maestro
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download APK artifact from previous job
uses: actions/download-artifact@v4
if: github.event_name == 'workflow_dispatch'
with:
name: elementx-apk-maestro
- name: Enable KVM group perms
Expand All @@ -95,6 +81,7 @@ jobs:
run: curl -fsSL "https://get.maestro.mobile.dev" | bash
- name: Run Maestro tests in emulator
uses: reactivecircus/android-emulator-runner@v2
continue-on-error: true
env:
MAESTRO_USERNAME: maestroelement
MAESTRO_PASSWORD: ${{ secrets.MATRIX_MAESTRO_ACCOUNT_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#

adb install -r $1
set -x
echo "Starting the screen recording..."
adb push .github/workflows/scripts/maestro/local-recording.sh /data/local/tmp/
adb shell "chmod +x /data/local/tmp/local-recording.sh"
Expand Down
Loading