Skip to content

Commit 52bfff8

Browse files
committed
ci: harden Maestro E2E rollout
1 parent 3a03be3 commit 52bfff8

2 files changed

Lines changed: 39 additions & 3 deletions

File tree

.github/workflows/maestro-e2e.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,12 @@ jobs:
6565
name: Android ${{ matrix.suite }}
6666
needs: prepare
6767
if: >-
68+
(vars.MOBILE_E2E_ENABLED == 'true' || github.event_name == 'workflow_dispatch') &&
6869
github.actor != 'dependabot[bot]' &&
6970
(github.event_name != 'pull_request' ||
7071
github.event.pull_request.head.repo.full_name == github.repository)
7172
runs-on: ubuntu-latest
72-
timeout-minutes: 45
73+
timeout-minutes: 60
7374
strategy:
7475
fail-fast: false
7576
matrix:
@@ -84,10 +85,17 @@ jobs:
8485
repository: customerio/mobile-e2e
8586
ref: ${{ inputs.harness_ref || 'main' }}
8687
path: .e2e-harness
87-
token: ${{ secrets.MOBILE_E2E_REPO_TOKEN || github.token }}
8888

8989
- uses: ./.github/actions/setup-android
9090

91+
- name: Install Android emulator packages
92+
run: |
93+
sdkmanager \
94+
"platform-tools" \
95+
"emulator" \
96+
"platforms;android-35" \
97+
"system-images;android-35;google_apis;x86_64"
98+
9199
- name: Enable emulator acceleration
92100
run: sudo chmod 666 /dev/kvm
93101

@@ -106,6 +114,24 @@ jobs:
106114
printf 'cdpApiKey=%s\nsiteId=%s\nworkspace=%s\n' \
107115
"$CDP_API_KEY" "$SITE_ID" "Mobile E2E" > samples/local.properties
108116
117+
- name: Validate E2E backend configuration
118+
env:
119+
SUITE: ${{ matrix.suite }}
120+
MAESTRO_EXT_API_KEY: ${{ secrets.MOBILE_E2E_EXT_API_KEY }}
121+
MAESTRO_APP_API_KEY: ${{ secrets.MOBILE_E2E_APP_API_KEY }}
122+
INBOX_TRANSACTIONAL_MESSAGE_ID: ${{ vars.MOBILE_E2E_INBOX_TRANSACTIONAL_MESSAGE_ID }}
123+
run: |
124+
required=(MAESTRO_EXT_API_KEY)
125+
if [[ "$SUITE" == "message-inbox" ]]; then
126+
required+=(MAESTRO_APP_API_KEY INBOX_TRANSACTIONAL_MESSAGE_ID)
127+
fi
128+
for name in "${required[@]}"; do
129+
if [[ -z "${!name}" ]]; then
130+
echo "::error::$name is not configured for Maestro E2E"
131+
exit 1
132+
fi
133+
done
134+
109135
- name: Run SDK to backend E2E
110136
env:
111137
MAESTRO_EXT_API_KEY: ${{ secrets.MOBILE_E2E_EXT_API_KEY }}

.maestro/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ combined summary. Nothing needs to be started manually.
4343
`./.maestro/run.sh <flow.yaml>` remains available when an app is already
4444
installed and a single low-level flow is being debugged.
4545

46-
Outputs land in `artifacts/e2e/android/<flow>/` (gitignored):
46+
The latest focused artifacts land in `artifacts/e2e/android/<flow>/`. Profile
47+
runs also archive immutable snapshots beneath
48+
`.maestro/harness/artifacts/e2e/profile-<timestamp>/android/<flow>/`; the printed
49+
summary links to those snapshots. Both locations are gitignored.
4750

4851
| File | What it is |
4952
|---|---|
@@ -90,3 +93,10 @@ widget's matching `accessibilityIdentifier`.
9093
to a 5 fps `screenshot` poll — see the iOS sample's `capture_frames.sh`.
9194
- No cleanup of created Customer.io customers. Test-prod workspace is
9295
fine for now.
96+
97+
## CI rollout
98+
99+
The workflow is wired for PR smoke, weekday standard, and focused manual runs.
100+
PR/scheduled jobs require `MOBILE_E2E_ENABLED=true`, the two `MOBILE_E2E_*_API_KEY`
101+
secrets, and the Inbox message-ID variable. Leave the flag unset until the shared
102+
harness is merged and one manual dispatch has passed.

0 commit comments

Comments
 (0)