From 562ac2b0f42a8572c12f8cb64fd961db90acca08 Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 06:34:39 -0700 Subject: [PATCH 01/11] connect project to eas --- example/app.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/example/app.json b/example/app.json index 521138a..f734028 100644 --- a/example/app.json +++ b/example/app.json @@ -45,6 +45,13 @@ "experiments": { "typedRoutes": true, "reactCompiler": true - } + }, + "extra": { + "router": {}, + "eas": { + "projectId": "9c680ba9-b514-4d3e-9b75-6d7e7baf0e3e" + } + }, + "owner": "mxwidgetsdk" } } From ce4cdcb5042f98209983a9129891410688fce0ba Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 06:59:23 -0700 Subject: [PATCH 02/11] added a github workflow for e2e tests --- .github/workflows/e2e-tests.yml | 112 ++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 .github/workflows/e2e-tests.yml diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml new file mode 100644 index 0000000..2208e86 --- /dev/null +++ b/.github/workflows/e2e-tests.yml @@ -0,0 +1,112 @@ +name: E2E Tests + +on: + pull_request: + +jobs: + e2e-test: + runs-on: ubuntu-latest + timeout-minutes: 30 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: "npm" + + - name: Install SDK dependencies + run: npm install + + - name: Build SDK + run: npm run build + + - name: Install example app dependencies + working-directory: ./example + run: npm install + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "17" + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Cache Gradle + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Install Maestro CLI + run: | + curl -Ls "https://get.maestro.mobile.dev" | bash + echo "$HOME/.maestro/bin" >> $GITHUB_PATH + + - name: Verify Maestro installation + run: maestro --version + + - name: Enable KVM group perms + 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: Cache AVD + uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd-31 + + - name: Create AVD and generate snapshot for caching + if: steps.avd-cache.outputs.cache-hit != 'true' + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 31 + arch: x86_64 + target: google_apis + profile: pixel_6 + force-avd-creation: false + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: echo "Generated AVD snapshot for caching." + + - name: Build Android app + working-directory: ./example + run: npx expo prebuild --platform android && cd android && ./gradlew assembleDebug + + - name: Run Maestro tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 31 + arch: x86_64 + target: google_apis + profile: pixel_6 + emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none + disable-animations: true + script: | + cd example + adb install android/app/build/outputs/apk/debug/app-debug.apk + npm run e2e + + - name: Upload Maestro test results + if: always() + uses: actions/upload-artifact@v4 + with: + name: maestro-test-results + path: | + example/.maestro/ + ~/.maestro/tests/ + retention-days: 7 From 09e2b3af497081f00f397a6c485585c857817bf6 Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 07:29:27 -0700 Subject: [PATCH 03/11] attempting to clear up space before running tests --- .github/workflows/e2e-tests.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 2208e86..cf2cd2a 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -12,6 +12,19 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Free up disk space + run: | + echo "Disk space before cleanup:" + df -h + sudo rm -rf /usr/share/dotnet + sudo rm -rf /usr/local/lib/android + sudo rm -rf /opt/ghc + sudo rm -rf /usr/local/share/boost + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + sudo docker image prune --all --force + echo "Disk space after cleanup:" + df -h + - name: Setup Node.js uses: actions/setup-node@v4 with: From 8415586f6772b16961c77a377f5795f4ed7e6d71 Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 07:32:48 -0700 Subject: [PATCH 04/11] cleanup less --- .github/workflows/e2e-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index cf2cd2a..33ddfa7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -17,7 +17,6 @@ jobs: echo "Disk space before cleanup:" df -h sudo rm -rf /usr/share/dotnet - sudo rm -rf /usr/local/lib/android sudo rm -rf /opt/ghc sudo rm -rf /usr/local/share/boost sudo rm -rf "$AGENT_TOOLSDIRECTORY" From e565efcd2a4f97dcc01596556f7dfa2fa0d1f63a Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 08:10:08 -0700 Subject: [PATCH 05/11] attempting to fix e2e tests --- .github/workflows/e2e-tests.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 33ddfa7..34587e0 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -97,7 +97,11 @@ jobs: - name: Build Android app working-directory: ./example - run: npx expo prebuild --platform android && cd android && ./gradlew assembleDebug + run: | + npx expo prebuild --platform android + cd android + ./gradlew assembleDebug + ls -la app/build/outputs/apk/debug/ - name: Run Maestro tests uses: reactivecircus/android-emulator-runner@v2 @@ -109,9 +113,10 @@ jobs: emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: | - cd example - adb install android/app/build/outputs/apk/debug/app-debug.apk - npm run e2e + cd example/android + adb install app/build/outputs/apk/debug/app-debug.apk + cd .. + maestro test ./maestro/ --format junit --output maestro-results.xml - name: Upload Maestro test results if: always() @@ -119,6 +124,6 @@ jobs: with: name: maestro-test-results path: | - example/.maestro/ - ~/.maestro/tests/ + example/maestro-results.xml retention-days: 7 + if-no-files-found: warn From 84749814db9ba077640d78f44430580cbabb5707 Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 08:41:30 -0700 Subject: [PATCH 06/11] attempting to fix e2e tests --- .github/workflows/e2e-tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 34587e0..9dc92f7 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -113,9 +113,8 @@ jobs: emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: | - cd example/android - adb install app/build/outputs/apk/debug/app-debug.apk - cd .. + adb install example/android/app/build/outputs/apk/debug/app-debug.apk + cd example maestro test ./maestro/ --format junit --output maestro-results.xml - name: Upload Maestro test results From 79e2821ea0895cf9d785cc7f1a7f1e2deb14542f Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 09:14:29 -0700 Subject: [PATCH 07/11] another attempted fix for e2e tests --- .github/workflows/e2e-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 9dc92f7..17ad89b 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -114,8 +114,8 @@ jobs: disable-animations: true script: | adb install example/android/app/build/outputs/apk/debug/app-debug.apk - cd example - maestro test ./maestro/ --format junit --output maestro-results.xml + maestro test ./example/maestro/ --format junit --output maestro-results.xml + mv maestro-results.xml example/ - name: Upload Maestro test results if: always() From d1260ea84fc65e12929adc8f273b72dcca10987e Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 09:48:24 -0700 Subject: [PATCH 08/11] testing another pipeline change --- .github/workflows/e2e-tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 17ad89b..07d3c3e 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -115,7 +115,10 @@ jobs: script: | adb install example/android/app/build/outputs/apk/debug/app-debug.apk maestro test ./example/maestro/ --format junit --output maestro-results.xml - mv maestro-results.xml example/ + ls -la + cat maestro-results.xml || echo "Results file not found in root" + mv maestro-results.xml example/ || echo "Could not move file" + ls -la example/ - name: Upload Maestro test results if: always() From 0d7674c9aed654fc419588592359330498da4958 Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 10:16:44 -0700 Subject: [PATCH 09/11] another attempt at a fix --- .github/workflows/e2e-tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 07d3c3e..8bf229f 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -114,11 +114,15 @@ jobs: disable-animations: true script: | adb install example/android/app/build/outputs/apk/debug/app-debug.apk - maestro test ./example/maestro/ --format junit --output maestro-results.xml + maestro test ./example/maestro/ --format junit --output maestro-results.xml || true ls -la - cat maestro-results.xml || echo "Results file not found in root" - mv maestro-results.xml example/ || echo "Could not move file" - ls -la example/ + if [ -f maestro-results.xml ]; then + mv maestro-results.xml example/ + echo "Results file moved to example/" + else + echo "Results file was not created" + fi + maestro test ./example/maestro/ - name: Upload Maestro test results if: always() From 2834a36aa5ec67b79834398a911aeb81ff3bae12 Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 10:50:54 -0700 Subject: [PATCH 10/11] another attempted fix --- .github/workflows/e2e-tests.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 8bf229f..c1fd90a 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -115,13 +115,7 @@ jobs: script: | adb install example/android/app/build/outputs/apk/debug/app-debug.apk maestro test ./example/maestro/ --format junit --output maestro-results.xml || true - ls -la - if [ -f maestro-results.xml ]; then - mv maestro-results.xml example/ - echo "Results file moved to example/" - else - echo "Results file was not created" - fi + test -f maestro-results.xml && mv maestro-results.xml example/ && echo "Results file moved" || echo "No results file" maestro test ./example/maestro/ - name: Upload Maestro test results From afdd9a29723be81dd09c7002b9d1f47b32e6069e Mon Sep 17 00:00:00 2001 From: Wes Risenmay Date: Fri, 19 Dec 2025 11:20:49 -0700 Subject: [PATCH 11/11] adding screenshots/video to the upload --- .github/workflows/e2e-tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index c1fd90a..3be7762 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -114,9 +114,12 @@ jobs: disable-animations: true script: | adb install example/android/app/build/outputs/apk/debug/app-debug.apk + mkdir -p maestro-output maestro test ./example/maestro/ --format junit --output maestro-results.xml || true - test -f maestro-results.xml && mv maestro-results.xml example/ && echo "Results file moved" || echo "No results file" - maestro test ./example/maestro/ + maestro record ./example/maestro/ --output maestro-output/ || maestro test ./example/maestro/ + test -f maestro-results.xml && mv maestro-results.xml example/ || echo "No results file" + test -d maestro-output && mv maestro-output example/ || echo "No maestro output directory" + ls -la example/ - name: Upload Maestro test results if: always() @@ -125,5 +128,7 @@ jobs: name: maestro-test-results path: | example/maestro-results.xml + example/maestro-output/ + ~/.maestro/tests/ retention-days: 7 if-no-files-found: warn