Skip to content

Commit 664f21d

Browse files
Stop integration-tests workflow from hanging 6h on broken emulator
The Integration Tests workflow has never produced a green run since it was added in July 2025 (481 runs, 0 successes). When the emulator fails to boot (which is now the steady state on macos-latest Apple Silicon), the always-on `Collect Test Logs` step calls `adb logcat -d` which blocks indefinitely waiting for a device that never appears. The job then sits for the full 6h GitHub Actions job timeout on every nightly cron and every PR run. Add step-level timeouts and `|| true` so the failure is fast and the workflow doesn't waste 6h of runner time on every failed run. This doesn't make Integration Tests pass — that requires a proper refactor to ReactiveCircus/android-emulator-runner@v2 on Ubuntu+KVM (separate follow-up) — but it stops the nightly resource bleed today. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7d4a80b commit 664f21d

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,15 @@ jobs:
265265
266266
- name: Collect Test Logs
267267
if: always()
268+
# SDK-170: `adb logcat -d` blocks indefinitely when no device is connected
269+
# (e.g. when the emulator failed to boot). That hang has been making this
270+
# workflow consume the full 6h GitHub Actions job timeout on every run
271+
# since the macos-latest flip to Apple Silicon. Cap it at 2 minutes; on a
272+
# healthy emulator the command finishes in <1s.
273+
timeout-minutes: 2
268274
run: |
269275
echo "Collecting test logs..."
270-
adb logcat -d > integration-tests/build/test-logs.txt
276+
adb logcat -d > integration-tests/build/test-logs.txt || true
271277
272278
- name: Upload Test Results
273279
if: always()
@@ -295,10 +301,12 @@ jobs:
295301

296302
- name: Stop emulator
297303
if: always()
304+
# SDK-170: `adb emu kill` can hang waiting for a device that never appeared.
305+
timeout-minutes: 1
298306
run: |
299307
echo "Stopping emulator..."
300-
adb emu kill
301-
308+
adb emu kill || true
309+
302310
integration-tests-nightly:
303311
name: Nightly Integration Tests
304312
runs-on: macos-latest
@@ -444,6 +452,8 @@ jobs:
444452

445453
- name: Stop emulator
446454
if: always()
455+
# SDK-170: see main `Stop emulator` step above.
456+
timeout-minutes: 1
447457
run: |
448458
echo "Stopping emulator..."
449-
adb emu kill
459+
adb emu kill || true

0 commit comments

Comments
 (0)