diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e7a4f6eb0..1d0ce98a2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: name: Run unit tests (macOS) - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 outputs: @@ -67,7 +67,7 @@ jobs: run: set -o pipefail && swift test | tee -a build-log.txt | xcbeautify --report junit --report-path . --junit-report-filename tests.xml - name: Publish Unit Tests Report - uses: mikepenz/action-junit-report@v3 + uses: mikepenz/action-junit-report@v4 if: always() with: check_name: Test Report (macOS) @@ -108,7 +108,7 @@ jobs: name: Run unit tests (iOS) - runs-on: macos-14 + runs-on: macos-15 timeout-minutes: 30 steps: @@ -143,7 +143,7 @@ jobs: run: | while xcodebuild -resolvePackageDependencies \ -scheme BrowserServicesKit-Package \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17' \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' \ -derivedDataPath DerivedData \ 2>&1 | grep Error; do :; done @@ -156,7 +156,7 @@ jobs: run: | set -o pipefail && xcodebuild test \ -scheme BrowserServicesKit \ - -destination 'platform=iOS Simulator,name=iPhone 15,OS=17' \ + -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.0' \ -derivedDataPath DerivedData \ -skipPackagePluginValidation \ -skipMacroValidation \ @@ -165,7 +165,7 @@ jobs: | xcbeautify --report junit --report-path . --junit-report-filename ios-unittests.xml - name: Publish Unit Tests Report - uses: mikepenz/action-junit-report@v3 + uses: mikepenz/action-junit-report@v4 if: always() with: check_name: Test Report (iOS) diff --git a/.xcode-version b/.xcode-version index 232a7fc1a..0d68f8a0e 100644 --- a/.xcode-version +++ b/.xcode-version @@ -1 +1 @@ -15.4 +16.0 diff --git a/Package.resolved b/Package.resolved index cc5482ef4..1c38f0468 100644 --- a/Package.resolved +++ b/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/GRDB.swift.git", "state" : { - "revision" : "4225b85c9a0c50544e413a1ea1e502c802b44b35", - "version" : "2.4.0" + "revision" : "5b2f6a81099d26ae0f9e38788f51490cd6a4b202", + "version" : "2.4.2" } }, { diff --git a/Package.swift b/Package.swift index d5241f75e..69bca15ff 100644 --- a/Package.swift +++ b/Package.swift @@ -47,7 +47,7 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/duckduckgo/duckduckgo-autofill.git", exact: "13.1.0"), - .package(url: "https://github.com/duckduckgo/GRDB.swift.git", exact: "2.4.0"), + .package(url: "https://github.com/duckduckgo/GRDB.swift.git", exact: "2.4.2"), .package(url: "https://github.com/duckduckgo/TrackerRadarKit", exact: "3.0.0"), .package(url: "https://github.com/duckduckgo/sync_crypto", exact: "0.2.0"), .package(url: "https://github.com/gumob/PunycodeSwift.git", exact: "3.0.0"), diff --git a/Tests/ConfigurationTests/ConfigurationManagerTests.swift b/Tests/ConfigurationTests/ConfigurationManagerTests.swift index 97cd49569..6d3ba8b07 100644 --- a/Tests/ConfigurationTests/ConfigurationManagerTests.swift +++ b/Tests/ConfigurationTests/ConfigurationManagerTests.swift @@ -132,16 +132,15 @@ final class ConfigurationManagerTests: XCTestCase { let managerA = makeConfigurationManager(name: "A") let managerB = makeConfigurationManager(name: "B") - var e: XCTestExpectation? = expectation(description: "ConfigManager B updated") + let e = XCTestExpectation(description: "ConfigManager B updated") managerB.onDependenciesUpdated = { - e?.fulfill() - e = nil + e.fulfill() } let configData = Data("Privacy Config".utf8) MockURLProtocol.requestHandler = { _ in (HTTPURLResponse.ok, configData) } await managerA.refreshNow() - await fulfillment(of: [e!], timeout: 2) + await fulfillment(of: [e], timeout: 2) XCTAssertNotNil(MockURLProtocol.lastRequest) XCTAssertEqual(managerB.dependencyProvider.privacyConfigData, configData) @@ -152,33 +151,31 @@ final class ConfigurationManagerTests: XCTestCase { let managerA = makeConfigurationManager() let managerB = makeConfigurationManager() - var e: XCTestExpectation? = expectation(description: "ConfigManager B updated") + var e = XCTestExpectation(description: "ConfigManager B updated") managerB.onDependenciesUpdated = { - e?.fulfill() - e = nil + e.fulfill() } var configData = Data("Privacy Config".utf8) MockURLProtocol.requestHandler = { _ in (HTTPURLResponse.ok, configData) } await managerA.refreshNow() - await fulfillment(of: [e!], timeout: 2) + await fulfillment(of: [e], timeout: 2) XCTAssertNotNil(MockURLProtocol.lastRequest) XCTAssertEqual(managerB.dependencyProvider.privacyConfigData, configData) XCTAssertEqual(managerB.dependencyProvider.privacyConfigEtag, HTTPURLResponse.testEtag) MockURLProtocol.lastRequest = nil - e = expectation(description: "ConfigManager A updated") + e = XCTestExpectation(description: "ConfigManager A updated") managerB.onDependenciesUpdated = nil managerA.onDependenciesUpdated = { - e?.fulfill() - e = nil + e.fulfill() } configData = Data("Privacy Config 2".utf8) MockURLProtocol.requestHandler = { _ in (HTTPURLResponse.ok, configData) } await managerB.refreshNow() - await fulfillment(of: [e!], timeout: 2) + await fulfillment(of: [e], timeout: 2) XCTAssertNotNil(MockURLProtocol.lastRequest) XCTAssertEqual(managerA.dependencyProvider.privacyConfigData, configData) @@ -197,16 +194,15 @@ final class ConfigurationManagerTests: XCTestCase { let managerA = makeConfigurationManager() let managerB = makeConfigurationManager() - var e: XCTestExpectation? = expectation(description: "ConfigManager B updated") + let e = XCTestExpectation(description: "ConfigManager B updated") managerB.onDependenciesUpdated = { - e?.fulfill() - e = nil + e.fulfill() } let configData = Data("Privacy Config".utf8) MockURLProtocol.requestHandler = { _ in (HTTPURLResponse.ok, configData) } await managerA.refreshNow() - await fulfillment(of: [e!], timeout: 2) + await fulfillment(of: [e], timeout: 2) XCTAssertNotNil(MockURLProtocol.lastRequest) XCTAssertEqual(managerB.dependencyProvider.privacyConfigData, configData)