diff --git a/.buildkite/shared-pipeline-vars b/.buildkite/shared-pipeline-vars index c502489f6..175286d2e 100644 --- a/.buildkite/shared-pipeline-vars +++ b/.buildkite/shared-pipeline-vars @@ -3,7 +3,7 @@ # This file is `source`'d before calling `buildkite-agent pipeline upload`, and can be used # to set up some variables that will be interpolated in the `.yml` pipeline before uploading it. -XCODE_VERSION="26.0" +XCODE_VERSION="26.1.1" CI_TOOLKIT_PLUGIN_VERSION="3.7.1" TEST_COLLECTOR_VERSION="v1.10.2" diff --git a/Cargo.lock b/Cargo.lock index 4474605ca..4be0d585b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5185,6 +5185,7 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", + "uuid", "wp_api", ] diff --git a/Gemfile b/Gemfile index 543d3b0da..51cbb0f90 100644 --- a/Gemfile +++ b/Gemfile @@ -5,3 +5,4 @@ source 'https://rubygems.org' gem 'fastlane', '~> 2.228' gem 'fastlane-plugin-wpmreleasetoolkit', '~> 13.7' gem 'fluent-tools', '~> 0.3' +gem "openssl", "~> 3.3.1" diff --git a/Makefile b/Makefile index f63a7e656..c653d0174 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ swift-example-app-mac: swift-example-app-ios: xcrun simctl create "iPhone 17 Pro Test Device" "com.apple.CoreSimulator.SimDeviceType.iPhone-17-Pro" - bundle exec fastlane run run_tests project:native/swift/Example/Example.xcodeproj scheme:Example build_for_testing:true ensure_devices_found:true device:"iPhone 17 Pro Test Device (26.0)" xcargs:"-skipPackagePluginValidation" + bundle exec fastlane run run_tests project:native/swift/Example/Example.xcodeproj scheme:Example build_for_testing:true ensure_devices_found:true device:"iPhone 17 Pro Test Device (26.1)" xcargs:"-skipPackagePluginValidation" test-swift: $(MAKE) test-swift-$(uname) @@ -176,13 +176,13 @@ test-swift-darwin: xcframework test-swift-macOS: test-swift-darwin test-swift-iOS: xcframework - scripts/xcodebuild-test.sh iOS-26-0 + scripts/xcodebuild-test.sh iOS-26-1 test-swift-tvOS: xcframework - scripts/xcodebuild-test.sh tvOS-26-0 + scripts/xcodebuild-test.sh tvOS-26-1 test-swift-watchOS: xcframework - scripts/xcodebuild-test.sh watchOS-26-0 + scripts/xcodebuild-test.sh watchOS-26-1 test-rust-lib: $(rust_docker_run) cargo test --lib -- --nocapture diff --git a/Package.swift b/Package.swift index 8fe6d4bb1..21e87dd66 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version: 6.1 +// swift-tools-version: 6.2 import Foundation import PackageDescription @@ -87,6 +87,13 @@ var package = Package( .target(name: "WordPressAPIInternal") ], path: "native/swift/Tests/wordpress-api-cache" + ), + .testTarget( + name: "WordPressApiCompatibilityTests", + dependencies: [ + .target(name: "WordPressAPI"), + ], + path: "native/swift/Tests/api-compatibility" ) ].addingIntegrationTests() ) diff --git a/native/swift/Tests/api-compatibility/AppNotifier.swift b/native/swift/Tests/api-compatibility/AppNotifier.swift new file mode 100644 index 000000000..fdd848eb4 --- /dev/null +++ b/native/swift/Tests/api-compatibility/AppNotifier.swift @@ -0,0 +1,7 @@ +import WordPressAPI + +final class AppNotifier: WpAppNotifier { + func requestedWithInvalidAuthentication(requestUrl: String) async { + // Ignore this for tests + } +} diff --git a/native/swift/Tests/api-compatibility/wpcom/SupportTickets.swift b/native/swift/Tests/api-compatibility/wpcom/SupportTickets.swift new file mode 100644 index 000000000..23cacde3b --- /dev/null +++ b/native/swift/Tests/api-compatibility/wpcom/SupportTickets.swift @@ -0,0 +1,27 @@ +import Foundation +import Testing +import WordPressAPI + +// This test ensures that existing code compiles – it's not meant to run anything +struct SupportTicketsCompatTests { + + @Test func `test ticket creation params`() async throws { + _ = CreateSupportTicketParams( + subject: "Hello World", + message: "Test Message", + application: "Test Suite", + wpcomSiteId: 1234, + tags: ["tag1", "tag2"], + encryptedLogIds: [UUID().uuidString] + ) + } + + @Test func `test ticket reply params`() async throws { + _ = AddMessageToSupportConversationParams( + message: "This is a reply", + attachments: [ + "/path/to/file/on/disk" + ] + ) + } +} diff --git a/wordpress.Dockerfile b/wordpress.Dockerfile index f26159329..60694f177 100644 --- a/wordpress.Dockerfile +++ b/wordpress.Dockerfile @@ -66,5 +66,5 @@ RUN curl -s -o swiftly.tar.gz "https://download.swift.org/swiftly/linux/swiftly- RUN apt-get update \ && apt-get -y -qq install libicu-dev libcurl4-openssl-dev libedit-dev libsqlite3-dev \ libncurses-dev libpython3-dev libxml2-dev uuid-dev git libstdc++-12-dev -RUN swiftly install --progress-file /dev/null --use 6.1 +RUN swiftly install --progress-file /dev/null --use 6.2 RUN swift --version diff --git a/wp_api/src/wp_com/support_tickets.rs b/wp_api/src/wp_com/support_tickets.rs index 67d7b41fa..2d2f26b84 100644 --- a/wp_api/src/wp_com/support_tickets.rs +++ b/wp_api/src/wp_com/support_tickets.rs @@ -19,6 +19,8 @@ pub struct CreateSupportTicketParams { #[uniffi(default = [])] pub tags: Vec, #[uniffi(default = [])] + pub encrypted_log_ids: Vec, + #[uniffi(default = [])] #[serde(skip)] pub attachments: Vec, } diff --git a/wp_com_e2e/Cargo.toml b/wp_com_e2e/Cargo.toml index bf8ee15d5..7265770d7 100644 --- a/wp_com_e2e/Cargo.toml +++ b/wp_com_e2e/Cargo.toml @@ -14,6 +14,7 @@ serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } tokio = { workspace = true, features = ["full"] } tokio-stream = { workspace = true } +uuid = { workspace = true } wp_api = { path = "../wp_api", features = [ "reqwest-request-executor" ] } [[bin]] diff --git a/wp_com_e2e/src/support_tickets_test.rs b/wp_com_e2e/src/support_tickets_test.rs index 3cd2e673f..0a128ce94 100644 --- a/wp_com_e2e/src/support_tickets_test.rs +++ b/wp_com_e2e/src/support_tickets_test.rs @@ -1,3 +1,4 @@ +use uuid::Uuid; use wp_api::wp_com::{ client::WpComApiClient, support_tickets::{ @@ -54,6 +55,7 @@ async fn create_conversation(client: &WpComApiClient) -> anyhow::Result