From 03432a54817ae39e55607a61fe754c825ea4434c Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Fri, 23 Jan 2026 04:18:36 +0100 Subject: [PATCH 1/2] fix(ci): add retry logic and remove dead TxBumpingTests reference - Add 3-attempt retry with simulator reset between failures to handle flaky "Application unknown to FrontBoard" errors - Remove TxBumpingTests reference (test was removed in ae51100f) - Reset simulator state before tests instead of just booting Co-Authored-By: Claude Opus 4.5 --- .github/workflows/integration-tests.yml | 55 ++++++++++++++++++------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 02190acb..b77d2b4c 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -48,11 +48,15 @@ jobs: xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile | xcbeautify echo "✅ Dependencies resolved at $(date)" - - name: Pre-start simulator + - name: Reset and start simulator run: | - echo "⏱️ Starting simulator at $(date)" - xcrun simctl boot "iPhone 16" || true - echo "✅ Simulator started at $(date)" + echo "⏱️ Resetting simulator at $(date)" + xcrun simctl shutdown all || true + xcrun simctl erase "iPhone 16" || true + xcrun simctl boot "iPhone 16" + # Wait for simulator to fully boot + sleep 5 + echo "✅ Simulator ready at $(date)" - name: Clean build run: | @@ -63,17 +67,38 @@ jobs: - name: Run integration tests run: | echo "⏱️ Starting integration tests at $(date)" - set -o pipefail && xcodebuild test \ - -scheme Bitkit \ - -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \ - -enableCodeCoverage NO \ - -parallel-testing-enabled NO \ - -only-testing:BitkitTests/TxBumpingTests \ - -only-testing:BitkitTests/UtxoSelectionTests \ - -only-testing:BitkitTests/BlocktankTests \ - -only-testing:BitkitTests/PaymentFlowTests \ - | xcbeautify --report junit - echo "✅ Integration tests completed at $(date)" + + run_tests() { + set -o pipefail && xcodebuild test \ + -scheme Bitkit \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=latest' \ + -enableCodeCoverage NO \ + -parallel-testing-enabled NO \ + -only-testing:BitkitTests/UtxoSelectionTests \ + -only-testing:BitkitTests/BlocktankTests \ + -only-testing:BitkitTests/PaymentFlowTests \ + | xcbeautify --report junit + } + + # Try up to 3 times with simulator reset between failures + for attempt in 1 2 3; do + echo "🔄 Test attempt $attempt of 3" + if run_tests; then + echo "✅ Integration tests completed at $(date)" + exit 0 + fi + + if [ $attempt -lt 3 ]; then + echo "⚠️ Test attempt $attempt failed, resetting simulator..." + xcrun simctl shutdown all || true + xcrun simctl erase "iPhone 16" || true + xcrun simctl boot "iPhone 16" + sleep 5 + fi + done + + echo "❌ All test attempts failed" + exit 1 - name: Upload test results uses: actions/upload-artifact@v4 From 6ea1834f02512f823a4072a500949ff7901f147d Mon Sep 17 00:00:00 2001 From: Ovi Trif Date: Fri, 23 Jan 2026 13:22:52 +0100 Subject: [PATCH 2/2] refactor: remove unnecessary initial simulator reset Address review feedback - GitHub runners start clean, so initial simulator reset is unnecessary. Keep reset only in retry logic where it's actually needed to recover from FrontBoard errors. --- .github/workflows/integration-tests.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index b77d2b4c..4112aa06 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -48,16 +48,6 @@ jobs: xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile | xcbeautify echo "✅ Dependencies resolved at $(date)" - - name: Reset and start simulator - run: | - echo "⏱️ Resetting simulator at $(date)" - xcrun simctl shutdown all || true - xcrun simctl erase "iPhone 16" || true - xcrun simctl boot "iPhone 16" - # Wait for simulator to fully boot - sleep 5 - echo "✅ Simulator ready at $(date)" - - name: Clean build run: | echo "⏱️ Cleaning build at $(date)"