Skip to content

Commit 7efe1e7

Browse files
authored
ci: cleanup disk space for iOS e2e tests (#1382)
## 📜 Description Fixed iOS 26 flakiness. ## 💡 Motivation and Context It seems like simultaneous video + screenshot causes simulator to hang. Additionally I remove simulator service: ```bash sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService || true ``` To be sure that there is no zombie simulators. ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### CI - kill sim service before spinning up simulator; ### E2E - don't capture video + screenshots together; ## 🤔 How Has This Been Tested? Tested via this PR. 5/5 attempts are successful. ## 📸 Screenshots (if appropriate): <img width="323" height="440" alt="image" src="https://github.com/user-attachments/assets/ec7cac40-22be-4345-b96a-5660627e39da" /> ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 4d2a0ab commit 7efe1e7

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/ios-e2e-test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,25 @@ jobs:
138138
- uses: maxim-lobanov/setup-xcode@v1
139139
with:
140140
xcode-version: ${{ matrix.devices.xcode }}
141+
- name: Cleanup iOS simulator
142+
run: |
143+
echo "Before:"
144+
df -h
145+
146+
# Kill simulator services
147+
sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService || true
148+
149+
# Unmount all runtime volumes
150+
mount | grep CoreSimulator | awk '{print $1}' | while read disk; do
151+
sudo diskutil unmount force "$disk" || true
152+
done
153+
154+
# Clean everything
155+
rm -rf ~/Library/Developer/CoreSimulator || true
156+
rm -rf ~/Library/Developer/Xcode/DerivedData || true
157+
158+
echo "After cleanup:"
159+
df -h
141160
- name: Get Xcode version
142161
run: xcodebuild -version
143162
# needed for additional runtime installation

e2e/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"test-example:ios-16": "detox test --configuration example.ios.sim-16.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
1313
"test-example:ios-17": "detox test --configuration example.ios.sim-17.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
1414
"test-example:ios-18": "detox test --configuration example.ios.sim-18.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
15-
"test-example:ios-26": "detox test --configuration example.ios.sim-26.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
16-
"test-example:ios-26e": "detox test --configuration example.ios.sim-26e.release --loglevel verbose --take-screenshots failing --record-videos failing --retries 2",
15+
"test-example:ios-26": "detox test --configuration example.ios.sim-26.release --loglevel verbose --take-screenshots none --record-videos none --retries 2",
16+
"test-example:ios-26e": "detox test --configuration example.ios.sim-26e.release --loglevel verbose --take-screenshots none --record-videos none --retries 2",
1717
"test": "echo \"Error: no test specified\" && exit 1",
1818
"detox-clean": "detox clean-framework-cache && detox build-framework-cache",
1919
"postinstall": "patch-package"

0 commit comments

Comments
 (0)