chore: bump yttrium to 0.10.43 #606
Workflow file for this run
This file contains hidden or 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 Tests with Maestro | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - edited | |
| workflow_dispatch: | |
| jobs: | |
| build_internal_samples: | |
| strategy: | |
| matrix: | |
| conf: [ | |
| { name: wallet, command: ":sample:wallet:assembleInternal" }, | |
| { name: dapp, command: ":sample:dapp:assembleInternal" }, | |
| ] | |
| name: Build Internal ${{ matrix.conf.name }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| architecture: x86_64 | |
| cache: 'gradle' | |
| - name: Cache Gradle | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.gradle/caches | |
| ~/.gradle/wrapper | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gradle- | |
| - name: Setup Required files to build samples | |
| with: | |
| GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
| FIREBASE_SERVICE_CREDENTIALS: ${{ secrets.FIREBASE_SERVICE_CREDENTIALS }} | |
| SECRETS_PROPERTIES: ${{ secrets.SECRETS_PROPERTIES }} | |
| ENCODED_STRING_DEBUG: ${{ secrets.WC_KOTLIN_DEBUG_KEYSTORE }} | |
| SIGNING_KEY_STORE_PATH_DEBUG: ${{ secrets.WC_KOTLIN_DEBUG_KEYSTORE_PATH }} | |
| ENCODED_STRING_INTERNAL: ${{ secrets.WC_KOTLIN_INTERNAL_KEYSTORE }} | |
| SIGNING_KEY_STORE_PATH_INTERNAL: ${{ secrets.WC_KOTLIN_INTERNAL_KEYSTORE_PATH }} | |
| ENCODED_STRING_UPLOAD: ${{ secrets.WC_KOTLIN_UPLOAD_KEYSTORE }} | |
| SIGNING_KEY_STORE_PATH_UPLOAD: ${{ secrets.WC_KOTLIN_UPLOAD_KEYSTORE_PATH }} | |
| uses: ./.github/actions/ci_setup | |
| - name: Build sample - Internal | |
| env: | |
| WC_CLOUD_PROJECT_ID: ${{ secrets.WC_CLOUD_PROJECT_ID }} | |
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
| NOTIFY_INTEGRATION_TESTS_PROJECT_ID: ${{ secrets.NOTIFY_INTEGRATION_TESTS_PROJECT_ID }} | |
| NOTIFY_INTEGRATION_TESTS_SECRET: ${{ secrets.NOTIFY_INTEGRATION_TESTS_SECRET }} | |
| MIX_PANEL: ${{ secrets.MIX_PANEL }} | |
| run: | | |
| ./gradlew ${{ matrix.conf.command }} | |
| - name: Upload APKs | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ matrix.conf.name }}-apk | |
| path: sample/${{ matrix.conf.name }}/build/outputs/apk/internal/*.apk | |
| retention-days: 1 | |
| run_e2e_tests: | |
| name: Run E2E Tests | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-16core | |
| needs: build_internal_samples | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Download all APKs | |
| uses: actions/download-artifact@v6 | |
| with: | |
| pattern: "*-apk" | |
| path: apks | |
| merge-multiple: true | |
| - name: List APKs | |
| run: | | |
| echo "Available APKs:" | |
| find apks -name "*.apk" | xargs ls -la | |
| - name: Install Maestro | |
| run: | | |
| curl -Ls "https://get.maestro.mobile.dev" | bash | |
| export PATH="$PATH":"$HOME/.maestro/bin" | |
| echo "$HOME/.maestro/bin" >> $GITHUB_PATH | |
| maestro --version | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v2 | |
| - name: Start Android Emulator and Run Tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 30 | |
| target: google_apis | |
| arch: x86_64 | |
| ram-size: 4096M | |
| heap-size: 576M | |
| emulator-boot-timeout: 900 | |
| profile: pixel_6 | |
| avd-name: test_device | |
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save -no-snapshot-load | |
| pre-emulator-launch-script: | | |
| echo "Running pre emulator launch script" | |
| pwd | |
| script: | | |
| # Setup debug directory | |
| mkdir -p debug-artifacts | |
| # Wait for emulator to be fully ready | |
| echo "Waiting for emulator to be ready..." | |
| adb wait-for-device | |
| # Wait for boot completion | |
| echo "Waiting for boot completion..." | |
| adb shell 'while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 2; done' | |
| echo "Boot completed!" | |
| echo "Emulator booted successfully" | |
| adb devices | |
| # Clear logcat before we start | |
| adb logcat -c | |
| # Start logcat capture in background | |
| adb logcat > debug-artifacts/full-logcat.txt & | |
| LOGCAT_PID=$! | |
| # Install APKs | |
| echo "Installing APKs:" | |
| find apks -name "*.apk" -exec echo "Installing: {}" \; -exec adb install -r {} \; | |
| # Verify installations | |
| echo "Verifying installed apps:" | |
| adb shell pm list packages | grep -E "com.reown.sample" || (echo "ERROR: Apps not installed correctly" && exit 1) | |
| # Check APK info | |
| echo "Checking APK details:" | |
| adb shell dumpsys package com.reown.sample.wallet.internal | grep -A 5 "versionName" | |
| # Clear app data | |
| echo "Clearing app data..." | |
| adb shell pm clear com.reown.sample.wallet.internal || true | |
| adb shell pm clear com.reown.sample.dapp.internal || true | |
| # Grant runtime permissions that might be needed | |
| echo "Granting permissions..." | |
| adb shell pm grant com.reown.sample.wallet.internal android.permission.INTERNET || true | |
| adb shell pm grant com.reown.sample.wallet.internal android.permission.ACCESS_NETWORK_STATE || true | |
| adb shell pm grant com.reown.sample.wallet.internal android.permission.ACCESS_WIFI_STATE || true | |
| adb shell pm grant com.reown.sample.wallet.internal android.permission.CAMERA || true | |
| # Check if the app needs to be enabled | |
| echo "Checking app state..." | |
| adb shell pm list packages -d | grep -q com.reown.sample.wallet.internal && adb shell pm enable com.reown.sample.wallet.internal || echo "App is not disabled" | |
| # Wait for system to settle | |
| sleep 10 | |
| # Check available activities | |
| echo "Checking available activities for wallet app:" | |
| adb shell dumpsys package com.reown.sample.wallet.internal | grep -A 10 "Activity" || true | |
| # Wait and capture state | |
| sleep 10 | |
| # Capture comprehensive debug info | |
| echo "=== CAPTURING DEBUG INFO ===" | |
| # Window state | |
| echo "Window state:" > debug-artifacts/window_state.txt | |
| adb shell dumpsys window windows >> debug-artifacts/window_state.txt | |
| # Current activity | |
| echo "Current activity:" > debug-artifacts/current_activity.txt | |
| adb shell dumpsys activity activities | grep -E "mResumedActivity|mFocusedActivity" >> debug-artifacts/current_activity.txt | |
| # Check for crashes | |
| echo "Checking for crashes..." | |
| adb logcat -d | grep -E "FATAL EXCEPTION|AndroidRuntime|Process.*com.reown" > debug-artifacts/crashes.txt || echo "No crashes found" > debug-artifacts/crashes.txt | |
| # ANR traces | |
| adb shell ls /data/anr/ > debug-artifacts/anr_list.txt 2>&1 || true | |
| # Memory info | |
| adb shell dumpsys meminfo com.reown.sample.wallet.internal > debug-artifacts/meminfo.txt || true | |
| # App process info | |
| adb shell ps | grep reown > debug-artifacts/processes.txt || true | |
| # Network state (important for WalletConnect) | |
| echo "Network state:" > debug-artifacts/network_state.txt | |
| adb shell dumpsys connectivity >> debug-artifacts/network_state.txt | |
| adb shell settings get global airplane_mode_on >> debug-artifacts/network_state.txt | |
| # Force stop before Maestro tests | |
| adb shell am force-stop com.reown.sample.wallet.internal | |
| adb shell am force-stop com.reown.sample.dapp.internal | |
| sleep 5 | |
| # Try to launch the app manually before Maestro | |
| echo "Attempting manual app launch..." | |
| adb shell monkey -p com.reown.sample.wallet.internal -c android.intent.category.LAUNCHER 1 | |
| sleep 10 | |
| # Check if app is running | |
| adb shell ps | grep -q "com.reown.sample.wallet.internal" || (echo "ERROR: Wallet app is not running after launch attempt" && adb shell am start -n com.reown.sample.wallet.internal/com.reown.sample.wallet.ui.WalletKitActivity || true) | |
| sleep 10 | |
| # Take a screenshot to see current state | |
| adb shell screencap /sdcard/app_state_before_maestro.png | |
| adb pull /sdcard/app_state_before_maestro.png debug-artifacts/ || true | |
| # Check current activity | |
| echo "Current activity before Maestro:" | |
| adb shell dumpsys activity activities | grep -E "mResumedActivity|mFocusedActivity" || true | |
| # DO NOT kill the app here - let's see if it's actually running properly | |
| echo "App state check complete, proceeding with Maestro tests..." | |
| echo "Running Maestro native to native tests:" | |
| maestro test .maestro/flows/native/connect_reject.yaml | |
| maestro test .maestro/flows/native/connect_confirm.yaml | |
| maestro test .maestro/flows/native/personal_sign_confirm.yaml | |
| # maestro test .maestro/flows/native/personal_sign_reject.yaml | |
| - name: Upload debug artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: debug-artifacts | |
| path: debug-artifacts/ | |
| if-no-files-found: warn | |
| - name: Upload Maestro artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: maestro-artifacts | |
| path: | | |
| .maestro/ | |
| videos/ | |
| *.mp4 | |
| *.mov | |
| if-no-files-found: warn |