From 06421fdf5a7e668bc94e5c2a25438d0d5c9ad742 Mon Sep 17 00:00:00 2001 From: Stalgia Grigg Date: Tue, 7 Jan 2025 17:53:48 -0800 Subject: [PATCH] Upload maestro artifacts --- .github/workflows/android-build.yml | 10 ++++++++++ tests/test-android.sh | 14 +++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml index 410e5cf..734e12e 100644 --- a/.github/workflows/android-build.yml +++ b/.github/workflows/android-build.yml @@ -56,3 +56,13 @@ jobs: - name: Run Android Build and Tests run: bash tests/test-android.sh + + - name: Upload Maestro artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: maestro-artifacts + path: | + ~/.maestro/tests/ + /home/runner/.maestro/tests/ + /home/runner/.maestro/logs/ diff --git a/tests/test-android.sh b/tests/test-android.sh index ec12e3b..11b6179 100755 --- a/tests/test-android.sh +++ b/tests/test-android.sh @@ -150,7 +150,19 @@ adb install "$APK_PATH" log_subsection "Starting Expo server..." yarn expo start & EXPO_PID=$! -sleep 5 + +log_subsection "Waiting for Expo server to be ready..." +for i in {1..30}; do + if curl -s http://localhost:8081/status | grep -q "packager-status:running"; then + echo "✅ Expo server is ready" + break + fi + echo "Waiting for Expo server... (attempt $i)" + sleep 2 +done + +log_subsection "Waiting for app to initialize..." +sleep 30 log_subsection "Running Maestro tests..." maestro test ./tests/*.yaml