test(flutter): UI e2e with Maestro (experimental) #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: e2e-sentry-flutter | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
paths: | |
- "!**/*.md" | |
- "!**/class-diagram.svg" | |
- ".github/workflows/e2e_flutter.yml" | |
- "dart/**" | |
- "flutter/**" | |
- "e2e_test/flutter/**" | |
env: | |
SENTRY_AUTH_TOKEN_E2E: ${{ secrets.SENTRY_AUTH_TOKEN_E2E }} | |
SENTRY_DIST: 1 | |
jobs: | |
cancel-previous-workflow: | |
runs-on: macos-latest-xlarge | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected] | |
with: | |
access_token: ${{ github.token }} | |
build: | |
name: E2E Flutter | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
defaults: | |
run: | |
working-directory: ./e2e_test/flutter | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: [stable, beta] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Maestro | |
run: brew tap mobile-dev-inc/tap && brew install mobile-dev-inc/tap/[email protected] | |
- uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # [email protected] | |
with: | |
channel: ${{ matrix.sdk }} | |
- run: flutter upgrade | |
- name: Pub Get | |
run: flutter pub get | |
- uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 # pin@v3 | |
with: | |
model: "iPhone 15" | |
os_version: "17.5" | |
- name: Build App | |
if: env.SENTRY_AUTH_TOKEN_E2E != null | |
run: | | |
flutter build ios --debug --simulator | |
xcrun simctl install Booted build/ios/iphonesimulator/Runner.app | |
- name: Run Maestro | |
env: | |
MAESTRO_DRIVER_STARTUP_TIMEOUT: 1500000 # 25 min, CI can be slow at times | |
run: maestro test flow.yaml -e SENTRY_DIST=${SENTRY_DIST} | |
- name: Store Maestro Logs | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: maestro-logs-test | |
path: MaestroLogs | |
# analyze: | |
# uses: ./.github/workflows/analyze.yml | |
# with: | |
# package: e2e_test/flutter | |
# panaThreshold: 0 |