Make Maestro run for each PR push (#4121)

- Remove the `workflow_run` configuration for the Maestro job.
- Make the 'build apk' job always run again too.
- Make sure the test results are uploaded when the Maestro job fails too (this broke somehow).
This commit is contained in:
Jorge Martin Espinosa
2025-01-13 21:06:59 +01:00
committed by GitHub
parent 819d3e81d1
commit d5c0a00a0c
3 changed files with 3 additions and 17 deletions

View File

@@ -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:
@@ -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) }}
@@ -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) }}
@@ -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
@@ -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 }}