mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-22 14:06:02 +00:00
fix: Use run-tests.sh in iOS CI for Swift Testing support
- Replace xcodebuild test with run-tests.sh script - The script properly handles Swift Testing framework - Remove xcresult bundle upload as it's not produced by the script
This commit is contained in:
parent
c33c9ac729
commit
e33a6f9841
1 changed files with 12 additions and 26 deletions
38
.github/workflows/ios.yml
vendored
38
.github/workflows/ios.yml
vendored
|
|
@ -204,30 +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
|
||||
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
|
||||
}
|
||||
|
||||
# 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 || {
|
||||
echo "Test failed. Checking for test results..."
|
||||
if [ -d "TestResults.xcresult" ]; then
|
||||
echo "Extracting test results..."
|
||||
xcrun xcresulttool get --path TestResults.xcresult --format json | jq '.issues.testFailureSummaries[]' || true
|
||||
fi
|
||||
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
|
||||
Loading…
Reference in a new issue