Use run-tests.sh for iOS CI testing

- Switch to using run-tests.sh script which properly handles Swift Testing
- The Xcode scheme is not configured for test action, so use SPM approach
- Remove xcresult upload as run-tests.sh doesn't produce them
This commit is contained in:
Peter Steinberger 2025-06-22 08:59:03 +02:00
parent f05ca0fde0
commit 75e09c4551

View file

@ -204,27 +204,16 @@ jobs:
- name: Run iOS tests
run: |
cd ios
echo "Running iOS tests on simulator..."
# First, list available simulators
xcrun simctl list devices available | grep iPhone | head -5
# Run tests with a more flexible destination
xcodebuild test \
-project VibeTunnel.xcodeproj \
-scheme VibeTunnel \
-destination "platform=iOS Simulator,name=iPhone 16 Pro" \
-configuration Debug \
-derivedDataPath build/DerivedData \
-resultBundlePath TestResults.xcresult \
-quiet || {
echo "Running iOS tests using Swift Testing framework..."
# Use the provided test script which handles Swift Testing properly
chmod +x run-tests.sh
./run-tests.sh || {
echo "::error::iOS tests failed"
exit 1
}
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: ios-test-results
path: ios/TestResults.xcresult
retention-days: 7
- name: Upload test logs on failure
if: failure()
run: |
echo "Tests failed. Check the logs above for details."
# Swift Testing doesn't produce xcresult bundles with run-tests.sh