From 558802b5525172f80f5bd26351a211063350967e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=ABl?= Date: Thu, 16 Jul 2026 09:44:42 +0200 Subject: [PATCH] Remove the simulator reset again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It was added on the theory that the runner's reused simulators were leaking state between runs. That theory was wrong: erasing both devices changed nothing — the same seven suites failed identically before and after. The leftover files LoggingTests trips on are its own, from a previous attempt of the same test within one run (the suite runs with -test-iterations 4), so nothing crosses runs for an erase to clean. Keeping a step that mutates shared state on the release machine for no measured benefit is worse than not having it. --- .github/workflows/unit-tests.yml | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index c108958a8..8698d6ef9 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -71,34 +71,6 @@ jobs: # of which Xcode built a given run. xcodebuild -version - - name: Reset the test simulators - # HealthChat: a hosted VM hands out a fresh simulator every run; this runner reuses the same - # devices, so app containers, caches and logs survive between runs. Suites asserting on clean - # state then fail on the previous run's leftovers — LoggingTests expects no log files and - # finds nine, in the same device container each time. - # - # Only the two devices the tooling pins are erased (UnitTests.swift, PreviewTests.swift, - # CI.swift), never `simctl erase all`: this machine is shared with the release pipeline, and - # a blanket wipe would take out simulator state that has nothing to do with this job. A - # missing device is not an error — the tooling creates it. - run: | - set -eu - for device in "iPhone 17" "iPhone SE (3rd generation)"; do - # Match on a trailing "(" so "iPhone 17" cannot also match "iPhone 17 Pro" — the same - # guard the tooling uses when it resolves a device. - udid=$(xcrun simctl list devices "iOS 26.5" available \ - | grep -F "$device (" \ - | grep -oE '[0-9A-F]{8}(-[0-9A-F]{4}){3}-[0-9A-F]{12}' \ - | head -1 || true) - if [ -n "$udid" ]; then - echo "Erasing $device ($udid)" - xcrun simctl shutdown "$udid" 2>/dev/null || true - xcrun simctl erase "$udid" - else - echo "$device not present — the tooling will create it" - fi - done - - name: Run tests # HealthChat: previews are skipped. PreviewTests renders a snapshot for every preview in the # app and was the entire reason this job could not fit in an hour — it never once finished,