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:
parent
819d3e81d1
commit
d5c0a00a0c
3 changed files with 3 additions and 17 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
|
@ -13,7 +13,7 @@ env:
|
||||||
CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true --no-configuration-cache
|
CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true --no-configuration-cache
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
debug:
|
build:
|
||||||
name: Build APKs
|
name: Build APKs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
|
|
||||||
17
.github/workflows/maestro-local.yml
vendored
17
.github/workflows/maestro-local.yml
vendored
|
|
@ -3,10 +3,7 @@ name: Maestro (local)
|
||||||
# Run this flow only when APK Build workflow completes
|
# Run this flow only when APK Build workflow completes
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_run:
|
pull_request:
|
||||||
workflows: [APK Build]
|
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
|
|
||||||
# Enrich gradle.properties for CI/CD
|
# Enrich gradle.properties for CI/CD
|
||||||
env:
|
env:
|
||||||
|
|
@ -21,7 +18,6 @@ jobs:
|
||||||
build-apk:
|
build-apk:
|
||||||
name: Build APK
|
name: Build APK
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
# Allow one per PR.
|
# Allow one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ format('maestro-{0}', github.ref) }}
|
group: ${{ format('maestro-{0}', github.ref) }}
|
||||||
|
|
@ -61,8 +57,6 @@ jobs:
|
||||||
name: Maestro test suite
|
name: Maestro test suite
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-apk]
|
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.
|
# Allow one per PR.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ format('maestro-{0}', github.ref) }}
|
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
|
# Ensure we are building the branch and not the branch after being merged on develop
|
||||||
# https://github.com/actions/checkout/issues/881
|
# https://github.com/actions/checkout/issues/881
|
||||||
ref: ${{ github.ref }}
|
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
|
- name: Download APK artifact from previous job
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
if: github.event_name == 'workflow_dispatch'
|
|
||||||
with:
|
with:
|
||||||
name: elementx-apk-maestro
|
name: elementx-apk-maestro
|
||||||
- name: Enable KVM group perms
|
- name: Enable KVM group perms
|
||||||
|
|
@ -95,6 +81,7 @@ jobs:
|
||||||
run: curl -fsSL "https://get.maestro.mobile.dev" | bash
|
run: curl -fsSL "https://get.maestro.mobile.dev" | bash
|
||||||
- name: Run Maestro tests in emulator
|
- name: Run Maestro tests in emulator
|
||||||
uses: reactivecircus/android-emulator-runner@v2
|
uses: reactivecircus/android-emulator-runner@v2
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
MAESTRO_USERNAME: maestroelement
|
MAESTRO_USERNAME: maestroelement
|
||||||
MAESTRO_PASSWORD: ${{ secrets.MATRIX_MAESTRO_ACCOUNT_PASSWORD }}
|
MAESTRO_PASSWORD: ${{ secrets.MATRIX_MAESTRO_ACCOUNT_PASSWORD }}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
adb install -r $1
|
adb install -r $1
|
||||||
set -x
|
|
||||||
echo "Starting the screen recording..."
|
echo "Starting the screen recording..."
|
||||||
adb push .github/workflows/scripts/maestro/local-recording.sh /data/local/tmp/
|
adb push .github/workflows/scripts/maestro/local-recording.sh /data/local/tmp/
|
||||||
adb shell "chmod +x /data/local/tmp/local-recording.sh"
|
adb shell "chmod +x /data/local/tmp/local-recording.sh"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue