diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 8ffd005..ff7cac8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -46,6 +46,8 @@ jobs: name: e2e-web path: .e2e if-no-files-found: warn + # .e2e is a hidden directory, which upload-artifact skips by default. + include-hidden-files: true retention-days: 7 ios: @@ -88,6 +90,8 @@ jobs: name: e2e-ios path: .e2e if-no-files-found: warn + # .e2e is a hidden directory, which upload-artifact skips by default. + include-hidden-files: true retention-days: 7 android: @@ -113,10 +117,23 @@ jobs: sudo udevadm trigger --name-match=kvm # android/ is generated (CNG). The Expo template signs release builds with the debug keystore. + # Only the emulator's ABI: building all four takes about 25 minutes. - name: Build the APK run: | npx expo prebuild --platform android --no-install - cd android && ./gradlew :app:assembleRelease + cd android && ./gradlew :app:assembleRelease -PreactNativeArchitectures=x86_64 + + # The emulator action downloads the system image once and fails the job when that download drops. + - name: Install the emulator system image + run: | + SDKMANAGER="$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" + "$SDKMANAGER" --licenses < <(yes) > /dev/null + for attempt in 1 2 3; do + "$SDKMANAGER" --install 'system-images;android-36;google_apis;x86_64' > /dev/null && exit 0 + echo "Download attempt $attempt failed" + sleep 30 + done + exit 1 - name: Run on an emulator uses: reactivecircus/android-emulator-runner@a421e43855164a8197daf9d8d40fe71c6996bb0d # v2.38.0 @@ -139,4 +156,6 @@ jobs: name: e2e-android path: .e2e if-no-files-found: warn + # .e2e is a hidden directory, which upload-artifact skips by default. + include-hidden-files: true retention-days: 7 diff --git a/tests/settings.e2e.ts b/tests/settings.e2e.ts index eb7740d..b3bd4f0 100644 --- a/tests/settings.e2e.ts +++ b/tests/settings.e2e.ts @@ -10,7 +10,7 @@ describe('settings', () => { test('change the skip forward interval', async ({ agent, screen }) => { await agent.act('set skip forward to {seconds} seconds', { params: { seconds: 45 } }); - await expect(screen.getByLabel('Skip forward').getByRole('button', '45s')).toBeSelected(); + await expect(screen.getByRole('button', '45s')).toBeSelected(); await expect(screen.getByRole('button', 'Skip forward 45 seconds')).toBeVisible(); });