rebreak-monorepo/.github/workflows/maestro-cloud.yml
chahinebrini 417191c90a test(maestro): 6 E2E flows + setup-guide + testID-TODO
User-runnable lokal via maestro CLI oder Studio (GUI). Ahmed-agent built.

Neue flows (.maestro/):
- auth/email-signin.yaml (admin@rebreak.org login via env-vars, NOT hardcoded)
- profile/view-and-edit.yaml (avatar tap → edit → save → verify)
- profile/demographics.yaml (accordion → fill 3 fields → verify save)
- settings/dark-theme.yaml (Settings → Theme → Dark → verify)
- urge/sos-flow.yaml (start SOS → atemübung → finish → rating)
- community/create-post.yaml (compose → publish)

SETUP.md ergänzt: install, prerequisites, env-vars, troubleshooting.

TODO_TESTIDS.md (17 missing testIDs, 7 high-prio):
- AppHeader: header-avatar-btn (alle flows betroffen, aktuell coordinate-fallback)
- urge: sos-send-btn (SOS-flow blocked ohne)
- profile/edit: nickname-input, save-btn

GH-Actions template (.github/workflows/maestro-cloud.yml) — NICHT aktiv,
braucht User-OK + EAS-secrets.

User runs:
  maestro test apps/rebreak-native/.maestro/auth/email-signin.yaml \
    --env=E2E_TEST_USER=admin --env=E2E_TEST_PASSWORD=<from Infisical>
  maestro studio  # GUI

Stolperfalle: charioanouar (Google OAuth) funktioniert nicht — admin-account
nutzen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 15:45:53 +02:00

95 lines
2.8 KiB
YAML

# Maestro Cloud — E2E template for rebreak-native.
# STATUS: TEMPLATE ONLY — not active. Requires User confirmation before enabling.
#
# Trigger: manual dispatch OR PR to main (commented out — enable after User GO).
# Requires:
# - MAESTRO_CLOUD_API_KEY in GitHub Actions secrets
# - EAS_TOKEN in GitHub Actions secrets
# - E2E_TEST_USER + E2E_TEST_PASSWORD in GitHub Actions secrets
# - Maestro Cloud account configured at mobile.dev
name: Maestro Cloud E2E (rebreak-native)
on:
workflow_dispatch:
inputs:
platform:
description: "Target platform"
required: true
default: "ios"
type: choice
options:
- ios
- android
# Uncomment to run on PRs — only after User approval:
# pull_request:
# branches: [main]
# paths:
# - "apps/rebreak-native/**"
# - "apps/rebreak-native/.maestro/**"
jobs:
maestro-cloud:
name: E2E (${{ inputs.platform || 'ios' }})
runs-on: ubuntu-latest
# Skip entirely if Maestro Cloud key is not configured —
# avoids CI failure on forks or before Cloud is set up.
if: ${{ secrets.MAESTRO_CLOUD_API_KEY != '' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install --frozen-lockfile
working-directory: apps/rebreak-native
# Build app via EAS — requires EAS_TOKEN secret and eas.json configured.
# Profile "preview" must produce a .ipa (iOS) or .apk (Android).
- name: Build with EAS
uses: expo/expo-github-action@v8
with:
eas-version: latest
token: ${{ secrets.EAS_TOKEN }}
- name: EAS Build
run: |
eas build \
--platform ${{ inputs.platform || 'ios' }} \
--profile preview \
--non-interactive \
--output ./build-artifact
working-directory: apps/rebreak-native
# Install Maestro CLI
- name: Install Maestro CLI
run: curl -Ls "https://get.maestro.mobile.dev" | bash
env:
MAESTRO_VERSION: 1.39.0
- name: Add Maestro to PATH
run: echo "$HOME/.maestro/bin" >> $GITHUB_PATH
# Upload build + run flows on Maestro Cloud
- name: Run Maestro Cloud
run: |
maestro cloud \
--apiKey ${{ secrets.MAESTRO_CLOUD_API_KEY }} \
--app ./build-artifact \
--device ${{ inputs.platform || 'ios' }} \
--env=E2E_TEST_USER=${{ secrets.E2E_TEST_USER }} \
--env=E2E_TEST_PASSWORD=${{ secrets.E2E_TEST_PASSWORD }} \
apps/rebreak-native/.maestro/
working-directory: ${{ github.workspace }}