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 - name: Run iOS tests
run: | run: |
cd ios cd ios
echo "Running iOS tests on simulator..." echo "Running iOS tests using Swift Testing framework..."
# First, list available simulators # Use the provided test script which handles Swift Testing properly
xcrun simctl list devices available | grep iPhone | head -5 chmod +x run-tests.sh
./run-tests.sh || {
# 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 "::error::iOS tests failed" echo "::error::iOS tests failed"
exit 1 exit 1
} }
- name: Upload test results - name: Upload test logs on failure
uses: actions/upload-artifact@v4 if: failure()
if: always() run: |
with: echo "Tests failed. Check the logs above for details."
name: ios-test-results # Swift Testing doesn't produce xcresult bundles with run-tests.sh
path: ios/TestResults.xcresult
retention-days: 7