Fix iOS CI and enable test execution

- Fix test file paths in Xcode project (remove doubled VibeTunnelTests prefix)
- Fix TestFixtures to match ServerConfig initializer signature
- Re-enable iOS test execution in CI workflow
- Add proper test results artifact upload
This commit is contained in:
Peter Steinberger 2025-06-22 08:51:18 +02:00
parent 3864212239
commit f05ca0fde0
3 changed files with 37 additions and 35 deletions

View file

@ -204,23 +204,27 @@ jobs:
- name: Run iOS tests
run: |
cd ios
echo "Running iOS tests..."
# TODO: The run-tests.sh script needs adjustments for CI environment
# For now, just verify tests can be built
echo "Building test targets..."
xcodebuild build-for-testing \
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 "::error::Failed to build iOS tests"
echo "::error::iOS tests failed"
exit 1
}
echo "::warning::iOS test execution temporarily disabled - tests built successfully"
- 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
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: ios-test-results
path: ios/TestResults.xcresult
retention-days: 7

View file

@ -41,28 +41,28 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
1D852A5C2BBD22D92B578BFE /* PerformanceTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PerformanceTests.swift; path = VibeTunnelTests/PerformanceTests.swift; sourceTree = "<group>"; };
210B160CA1C5185A85EE359C /* EdgeCaseTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EdgeCaseTests.swift; path = VibeTunnelTests/EdgeCaseTests.swift; sourceTree = "<group>"; };
1D852A5C2BBD22D92B578BFE /* PerformanceTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PerformanceTests.swift; path = PerformanceTests.swift; sourceTree = "<group>"; };
210B160CA1C5185A85EE359C /* EdgeCaseTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EdgeCaseTests.swift; path = EdgeCaseTests.swift; sourceTree = "<group>"; };
216D52E392D8F0CDC6358BB8 /* VibeTunnel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VibeTunnel.app; sourceTree = BUILT_PRODUCTS_DIR; };
26508D4774F932BE603A3A92 /* ServerConfigTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerConfigTests.swift; path = VibeTunnelTests/Models/ServerConfigTests.swift; sourceTree = "<group>"; };
31BCE90BB6113D30ABBD29B2 /* APIErrorTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIErrorTests.swift; path = VibeTunnelTests/APIErrorTests.swift; sourceTree = "<group>"; };
36DEB689EB0358B8710343B9 /* FileSystemTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FileSystemTests.swift; path = VibeTunnelTests/FileSystemTests.swift; sourceTree = "<group>"; };
5C009651579E8C0E4ADD20DC /* APIClientTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIClientTests.swift; path = VibeTunnelTests/Services/APIClientTests.swift; sourceTree = "<group>"; };
64175D4F50D00AA004E41143 /* VibeTunnelTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VibeTunnelTests.swift; path = VibeTunnelTests/VibeTunnelTests.swift; sourceTree = "<group>"; };
26508D4774F932BE603A3A92 /* ServerConfigTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ServerConfigTests.swift; path = Models/ServerConfigTests.swift; sourceTree = "<group>"; };
31BCE90BB6113D30ABBD29B2 /* APIErrorTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIErrorTests.swift; path = APIErrorTests.swift; sourceTree = "<group>"; };
36DEB689EB0358B8710343B9 /* FileSystemTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FileSystemTests.swift; path = FileSystemTests.swift; sourceTree = "<group>"; };
5C009651579E8C0E4ADD20DC /* APIClientTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIClientTests.swift; path = Services/APIClientTests.swift; sourceTree = "<group>"; };
64175D4F50D00AA004E41143 /* VibeTunnelTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VibeTunnelTests.swift; path = VibeTunnelTests.swift; sourceTree = "<group>"; };
651BDD47248F3D9D55994B3E /* VibeTunnelTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VibeTunnelTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
778FE49DC79E8514CD11A94F /* MockWebSocketTask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockWebSocketTask.swift; path = VibeTunnelTests/Mocks/MockWebSocketTask.swift; sourceTree = "<group>"; };
778FE49DC79E8514CD11A94F /* MockWebSocketTask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockWebSocketTask.swift; path = Mocks/MockWebSocketTask.swift; sourceTree = "<group>"; };
7C27ECCFC47CD72452A9FD3E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
A118F0B3208513EEF0373B69 /* TerminalParsingTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TerminalParsingTests.swift; path = VibeTunnelTests/TerminalParsingTests.swift; sourceTree = "<group>"; };
AB3C38909F88E2D50282BC51 /* WebSocketReconnectionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WebSocketReconnectionTests.swift; path = VibeTunnelTests/WebSocketReconnectionTests.swift; sourceTree = "<group>"; };
B38BEE7FE833B6FDC3A56BCE /* TestFixtures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestFixtures.swift; path = VibeTunnelTests/Utilities/TestFixtures.swift; sourceTree = "<group>"; };
B7FB8482C0055D3A8D80EE21 /* AuthenticationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AuthenticationTests.swift; path = VibeTunnelTests/AuthenticationTests.swift; sourceTree = "<group>"; };
C90343824B8E77C08ECFC3B1 /* BufferWebSocketClientTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferWebSocketClientTests.swift; path = VibeTunnelTests/Services/BufferWebSocketClientTests.swift; sourceTree = "<group>"; };
CCEB1F27FFC1C75B53ED3EE5 /* MockURLProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockURLProtocol.swift; path = VibeTunnelTests/Mocks/MockURLProtocol.swift; sourceTree = "<group>"; };
D020D89B8296E14F390D9C03 /* TestTags.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestTags.swift; path = VibeTunnelTests/Utilities/TestTags.swift; sourceTree = "<group>"; };
D6282B1FFEB2C1844BD4BC05 /* SessionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionTests.swift; path = VibeTunnelTests/Models/SessionTests.swift; sourceTree = "<group>"; };
DA2D6C604D5F6878F2F6337E /* MockAPIClient.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockAPIClient.swift; path = VibeTunnelTests/Mocks/MockAPIClient.swift; sourceTree = "<group>"; };
DFA051A5F108D190542BC035 /* StandaloneTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StandaloneTests.swift; path = VibeTunnelTests/StandaloneTests.swift; sourceTree = "<group>"; };
EFA3E0BED8017D7540A6B822 /* ConnectionManagerTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectionManagerTests.swift; path = VibeTunnelTests/Services/ConnectionManagerTests.swift; sourceTree = "<group>"; };
A118F0B3208513EEF0373B69 /* TerminalParsingTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TerminalParsingTests.swift; path = TerminalParsingTests.swift; sourceTree = "<group>"; };
AB3C38909F88E2D50282BC51 /* WebSocketReconnectionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WebSocketReconnectionTests.swift; path = WebSocketReconnectionTests.swift; sourceTree = "<group>"; };
B38BEE7FE833B6FDC3A56BCE /* TestFixtures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestFixtures.swift; path = Utilities/TestFixtures.swift; sourceTree = "<group>"; };
B7FB8482C0055D3A8D80EE21 /* AuthenticationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AuthenticationTests.swift; path = AuthenticationTests.swift; sourceTree = "<group>"; };
C90343824B8E77C08ECFC3B1 /* BufferWebSocketClientTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BufferWebSocketClientTests.swift; path = Services/BufferWebSocketClientTests.swift; sourceTree = "<group>"; };
CCEB1F27FFC1C75B53ED3EE5 /* MockURLProtocol.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockURLProtocol.swift; path = Mocks/MockURLProtocol.swift; sourceTree = "<group>"; };
D020D89B8296E14F390D9C03 /* TestTags.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestTags.swift; path = Utilities/TestTags.swift; sourceTree = "<group>"; };
D6282B1FFEB2C1844BD4BC05 /* SessionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionTests.swift; path = Models/SessionTests.swift; sourceTree = "<group>"; };
DA2D6C604D5F6878F2F6337E /* MockAPIClient.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MockAPIClient.swift; path = Mocks/MockAPIClient.swift; sourceTree = "<group>"; };
DFA051A5F108D190542BC035 /* StandaloneTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StandaloneTests.swift; path = StandaloneTests.swift; sourceTree = "<group>"; };
EFA3E0BED8017D7540A6B822 /* ConnectionManagerTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ConnectionManagerTests.swift; path = Services/ConnectionManagerTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */

View file

@ -5,16 +5,14 @@ enum TestFixtures {
static let validServerConfig = ServerConfig(
host: "localhost",
port: 8_888,
useSSL: false,
username: nil,
name: nil,
password: nil
)
static let sslServerConfig = ServerConfig(
host: "example.com",
port: 443,
useSSL: true,
username: "testuser",
name: "Test Server",
password: "testpass"
)