78 lines
2.6 KiB
YAML
78 lines
2.6 KiB
YAML
# Maestro E2E Tests
|
|
# Runs on: manual trigger, or when maestro flows change
|
|
# Requires secrets: TEST_STAFF_PHONE, TEST_STAFF_OTP, TEST_CLIENT_EMAIL, TEST_CLIENT_PASSWORD
|
|
# Optional: TEST_CLIENT_COMPANY, TEST_STAFF_SIGNUP_PHONE
|
|
name: Maestro E2E
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- 'apps/mobile/**/maestro/**'
|
|
- '.github/workflows/maestro-e2e.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'apps/mobile/**/maestro/**'
|
|
- '.github/workflows/maestro-e2e.yml'
|
|
|
|
jobs:
|
|
maestro-e2e:
|
|
name: 🎭 Maestro E2E
|
|
runs-on: macos-latest
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
- name: 📥 Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🦋 Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: '3.38.x'
|
|
channel: 'stable'
|
|
cache: true
|
|
|
|
- name: 🔧 Install Firebase CLI
|
|
run: npm install -g firebase-tools
|
|
|
|
- name: 📦 Get dependencies
|
|
run: make mobile-install
|
|
|
|
- name: 🔨 Build Staff APK
|
|
run: make mobile-staff-build PLATFORM=apk MODE=debug
|
|
|
|
- name: 🔨 Build Client APK
|
|
run: make mobile-client-build PLATFORM=apk MODE=debug
|
|
|
|
- name: 📲 Start emulator
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 33
|
|
target: default
|
|
arch: x86_64
|
|
profile: Nexus 6
|
|
script: |
|
|
# Install Maestro
|
|
curl -Ls "https://get.maestro.mobile.dev" | bash
|
|
export PATH="$HOME/.maestro/bin:$PATH"
|
|
maestro --version
|
|
|
|
# Install APKs
|
|
adb install -r apps/mobile/apps/staff/build/app/outputs/flutter-apk/app-debug.apk
|
|
adb install -r apps/mobile/apps/client/build/app/outputs/flutter-apk/app-debug.apk
|
|
|
|
# Run auth flows (Staff + Client)
|
|
maestro test --shard-split=1 \
|
|
apps/mobile/apps/staff/maestro/auth/sign_in.yaml \
|
|
apps/mobile/apps/staff/maestro/auth/sign_up.yaml \
|
|
apps/mobile/apps/client/maestro/auth/sign_in.yaml \
|
|
apps/mobile/apps/client/maestro/auth/sign_up.yaml \
|
|
-e TEST_STAFF_PHONE="${{ secrets.TEST_STAFF_PHONE }}" \
|
|
-e TEST_STAFF_OTP="${{ secrets.TEST_STAFF_OTP }}" \
|
|
-e TEST_STAFF_SIGNUP_PHONE="${{ secrets.TEST_STAFF_SIGNUP_PHONE }}" \
|
|
-e TEST_CLIENT_EMAIL="${{ secrets.TEST_CLIENT_EMAIL }}" \
|
|
-e TEST_CLIENT_PASSWORD="${{ secrets.TEST_CLIENT_PASSWORD }}" \
|
|
-e TEST_CLIENT_COMPANY="${{ secrets.TEST_CLIENT_COMPANY }}"
|