Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update supported Xcode version to 16.0 #1001

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

name: Run unit tests (macOS)

runs-on: macos-14
runs-on: macos-15
timeout-minutes: 30

outputs:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:

name: Run unit tests (iOS)

runs-on: macos-14
runs-on: macos-15
timeout-minutes: 30

steps:
Expand Down Expand Up @@ -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

Expand All @@ -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 \
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15.4
16.0
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
28 changes: 12 additions & 16 deletions Tests/ConfigurationTests/ConfigurationManagerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
Loading