Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 32 additions & 17 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ jobs:
xcodebuild -resolvePackageDependencies -onlyUsePackageVersionsFromResolvedFile | xcbeautify
echo "✅ Dependencies resolved at $(date)"

- name: Pre-start simulator
run: |
echo "⏱️ Starting simulator at $(date)"
xcrun simctl boot "iPhone 16" || true
echo "✅ Simulator started at $(date)"

- name: Clean build
run: |
echo "⏱️ Cleaning build at $(date)"
Expand All @@ -63,17 +57,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
Expand Down
Loading