Skip to content

Commit

Permalink
[CI] Bump Xcode version (#3509)
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple committed Dec 3, 2024
1 parent 80755a9 commit 88c724b
Show file tree
Hide file tree
Showing 987 changed files with 123 additions and 121 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/cron-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ jobs:
strategy:
matrix:
include:
- ios: 18.1
xcode: 16.1
os: macos-15
device: "iPhone 16 Pro"
setup_runtime: false
- ios: 17.4
xcode: 15.4
os: macos-14
Expand Down Expand Up @@ -123,6 +128,11 @@ jobs:
strategy:
matrix:
include:
- ios: 18.1
xcode: 16.1
os: macos-15
device: "iPhone 16 Pro"
setup_runtime: false
- ios: 17.4
xcode: 15.4
os: macos-14
Expand All @@ -138,16 +148,6 @@ jobs:
os: macos-14
device: "iPhone 13 Pro"
setup_runtime: true
- ios: 14.5
xcode: 14.2
os: macos-12
device: "iPhone 12 Pro"
setup_runtime: true
- ios: 13.7
xcode: 14.2
os: macos-12
device: "iPhone 11 Pro"
setup_runtime: true
fail-fast: false
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -189,11 +189,11 @@ jobs:
fastlane/test_output/logs/*/Diagnostics/**/*.txt
fastlane/test_output/logs/*/Diagnostics/simctl_diagnostics/DiagnosticReports/*
build-xcode14:
name: Build LLC + UI (Xcode 14)
runs-on: macos-12
build-old-xcode:
name: Build LLC + UI (Xcode 15)
runs-on: macos-14
env:
XCODE_VERSION: "14.0.1"
XCODE_VERSION: "15.0.1"
steps:
- name: Connect Bot
uses: webfactory/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
release:
name: Publish new release
runs-on: macos-12
runs-on: macos-15
steps:
- name: Connect Bot
uses: webfactory/[email protected]
Expand Down
26 changes: 12 additions & 14 deletions .github/workflows/smoke-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

env:
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI
IOS_SIMULATOR_DEVICE: "iPhone 15 Pro (17.4)"
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.1)"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}

Expand Down Expand Up @@ -48,9 +48,9 @@ jobs:
automated-code-review:
name: Automated Code Review
runs-on: macos-12
runs-on: macos-14
env:
XCODE_VERSION: "14.0.1"
XCODE_VERSION: "15.0.1"
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
steps:
- uses: actions/[email protected]
Expand All @@ -67,12 +67,12 @@ jobs:
if: startsWith(github.event.pull_request.head.ref, 'release/')
run: bundle exec fastlane pod_lint

build-xcode14:
name: Build LLC + UI (Xcode 14)
runs-on: macos-12
build-old-xcode:
name: Build LLC + UI (Xcode 15)
runs-on: macos-14
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
env:
XCODE_VERSION: "14.0.1"
XCODE_VERSION: "15.0.1"
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/ruby-cache
Expand All @@ -87,7 +87,7 @@ jobs:

test-llc-debug:
name: Test LLC (Debug)
runs-on: macos-14
runs-on: macos-15
if: ${{ github.event.inputs.snapshots != 'true' }}
needs: build-test-app-and-frameworks
steps:
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
test-ui-debug:
name: Test UI (Debug)
runs-on: macos-14
runs-on: macos-15
needs: build-test-app-and-frameworks
if: ${{ github.event_name != 'push' }}
steps:
Expand All @@ -152,7 +152,7 @@ jobs:
SKIP_BREW_BOOTSTRAP: true
- name: Run UI Tests (Debug)
run: bundle exec fastlane test_ui device:"${{ env.IOS_SIMULATOR_DEVICE }}" skip_build:true record:${{ github.event.inputs.snapshots }}
timeout-minutes: 60
timeout-minutes: 120
env:
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }} # to open a PR
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # to use github cli
Expand All @@ -170,7 +170,7 @@ jobs:
allure_testops_launch:
name: Launch Allure TestOps
runs-on: macos-13
runs-on: macos-14
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
needs: build-test-app-and-frameworks
outputs:
Expand All @@ -189,7 +189,7 @@ jobs:

test-e2e-debug:
name: Test E2E UI (Debug)
runs-on: macos-14
runs-on: macos-15
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
needs:
- allure_testops_launch
Expand All @@ -216,8 +216,6 @@ jobs:
run: bundle exec fastlane test_e2e_mock device:"${{ env.IOS_SIMULATOR_DEVICE }}" batch:'${{ matrix.batch }}' test_without_building:true
timeout-minutes: 100
env:
XCODE_VERSION: "15.0.1" # the most stable pair of Xcode
IOS_SIMULATOR_DEVICE: "iPhone 15 Pro (17.0)" # and iOS
MATRIX_SIZE: ${{ strategy.job-total }}
STREAM_DEMO_APP_SECRET: ${{ secrets.STREAM_DEMO_APP_SECRET }}
- name: Allure TestOps Upload
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-copyright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:
jobs:
copyright:
name: Copyright
runs-on: macos-13
runs-on: macos-14
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/ruby-cache
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ _December 03, 2024_
### 🐞 Fixed
- Fix a rare infinite loop triggering a crash when handling database changes [#3508](https://github.com/GetStream/stream-chat-swift/pull/3508)
- Fix reconnection timeout handler not working in the token provider phase [#3513](https://github.com/GetStream/stream-chat-swift/pull/3513)
### 🔄 Changed
- Minor breaking change in the test tools. Some mock classes were made internal and now require a `@testable` annotation [#3509](https://github.com/GetStream/stream-chat-swift/pull/3509)

## StreamChatUI
### 🐞 Fixed
Expand Down
3 changes: 3 additions & 0 deletions StreamChatUITestsAppUITests/Robots/UserRobot.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ extension UserRobot {
func clearComposer() -> Self {
if !composer.textView.text.isEmpty {
composer.inputField.tap()
if !composer.selectAllButton.waitForExistence(timeout: 1) {
composer.inputField.tap()
}
composer.selectAllButton.wait().safeTap()
composer.inputField.typeText(XCUIKeyboardKey.delete.rawValue)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
import Foundation
@testable import StreamChat

public class ChatChannelController_Mock: ChatChannelController {
class ChatChannelController_Mock: ChatChannelController {

var mockCid: ChannelId?
public override var cid: ChannelId? {
override var cid: ChannelId? {
mockCid ?? super.cid
}

var mockFirstUnreadMessageId: MessageId?
public override var firstUnreadMessageId: MessageId? {
override var firstUnreadMessageId: MessageId? {
mockFirstUnreadMessageId ?? super.firstUnreadMessageId
}

/// Creates a new mock instance of `ChatChannelController`.
public static func mock(chatClientConfig: ChatClientConfig? = nil) -> ChatChannelController_Mock {
static func mock(chatClientConfig: ChatClientConfig? = nil) -> ChatChannelController_Mock {
.init(
channelQuery: .init(cid: try! .init(cid: "mock:channel")),
channelListQuery: nil,
Expand All @@ -35,7 +35,7 @@ public class ChatChannelController_Mock: ChatChannelController {
)
}

public static func mock(
static func mock(
channelQuery: ChannelQuery,
channelListQuery: ChannelListQuery?,
client: ChatClient
Expand All @@ -47,7 +47,7 @@ public class ChatChannelController_Mock: ChatChannelController {
)
}

public static func mock(client: ChatClient) -> ChatChannelController_Mock {
static func mock(client: ChatClient) -> ChatChannelController_Mock {
.init(
channelQuery: .init(cid: try! .init(cid: "mock:channel")),
channelListQuery: nil,
Expand All @@ -56,7 +56,7 @@ public class ChatChannelController_Mock: ChatChannelController {
}

var createNewMessageCallCount = 0
public override func createNewMessage(
override func createNewMessage(
messageId: MessageId? = nil,
text: String, pinning: MessagePinning? = nil,
isSilent: Bool = false,
Expand All @@ -71,61 +71,61 @@ public class ChatChannelController_Mock: ChatChannelController {
createNewMessageCallCount += 1
}

public var hasLoadedAllNextMessages_mock: Bool? = true
public override var hasLoadedAllNextMessages: Bool {
var hasLoadedAllNextMessages_mock: Bool? = true
override var hasLoadedAllNextMessages: Bool {
hasLoadedAllNextMessages_mock ?? super.hasLoadedAllNextMessages
}

public var hasLoadedAllPreviousMessages_mock: Bool? = true
public override var hasLoadedAllPreviousMessages: Bool {
var hasLoadedAllPreviousMessages_mock: Bool? = true
override var hasLoadedAllPreviousMessages: Bool {
hasLoadedAllPreviousMessages_mock ?? super.hasLoadedAllPreviousMessages
}

public var markedAsUnread_mock: Bool? = true
public override var isMarkedAsUnread: Bool {
var markedAsUnread_mock: Bool? = true
override var isMarkedAsUnread: Bool {
markedAsUnread_mock ?? super.isMarkedAsUnread
}

public var channel_mock: ChatChannel?
override public var channel: ChatChannel? {
var channel_mock: ChatChannel?
override var channel: ChatChannel? {
channel_mock ?? super.channel
}

public var channelQuery_mock: ChannelQuery?
public override var channelQuery: ChannelQuery {
var channelQuery_mock: ChannelQuery?
override var channelQuery: ChannelQuery {
channelQuery_mock ?? super.channelQuery
}

public var messages_mock: [ChatMessage]?
override public var messages: LazyCachedMapCollection<ChatMessage> {
var messages_mock: [ChatMessage]?
override var messages: LazyCachedMapCollection<ChatMessage> {
messages_mock.map { $0.lazyCachedMap { $0 } } ?? super.messages
}

public var markReadCallCount = 0
public override func markRead(completion: ((Error?) -> Void)?) {
var markReadCallCount = 0
override func markRead(completion: ((Error?) -> Void)?) {
markReadCallCount += 1
}

public var state_mock: State?
override public var state: DataController.State {
var state_mock: State?
override var state: DataController.State {
get { state_mock ?? super.state }
set { super.state = newValue }
}

public private(set) var synchronize_completion: ((Error?) -> Void)?
override public func synchronize(_ completion: ((Error?) -> Void)? = nil) {
private(set) var synchronize_completion: ((Error?) -> Void)?
override func synchronize(_ completion: ((Error?) -> Void)? = nil) {
synchronize_completion = completion
}

public var loadFirstPageCallCount = 0
public var loadFirstPage_result: Error?
public override func loadFirstPage(_ completion: ((Error?) -> Void)? = nil) {
var loadFirstPageCallCount = 0
var loadFirstPage_result: Error?
override func loadFirstPage(_ completion: ((Error?) -> Void)? = nil) {
loadFirstPageCallCount += 1
completion?(loadFirstPage_result)
}

public var loadPageAroundMessageIdCallCount = 0
public override func loadPageAroundMessageId(
var loadPageAroundMessageIdCallCount = 0
override func loadPageAroundMessageId(
_ messageId: MessageId,
limit: Int? = nil,
completion: ((Error?) -> Void)? = nil
Expand All @@ -134,7 +134,7 @@ public class ChatChannelController_Mock: ChatChannelController {
}
}

public extension ChatChannelController_Mock {
extension ChatChannelController_Mock {
/// Simulates the initial conditions. Setting these values doesn't trigger any observer callback.
func simulateInitial(channel: ChatChannel, messages: [ChatMessage], state: DataController.State) {
channel_mock = channel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@
import Foundation
@testable import StreamChat

public class ChatChannelListController_Mock: ChatChannelListController, Spy {
public let spyState = SpyState()
public var loadNextChannelsIsCalled = false
public var loadNextChannelsCallCount = 0
public var resetChannelsQueryResult: Result<(synchedAndWatched: [ChatChannel], unwanted: Set<ChannelId>), Error>?
public var refreshLoadedChannelsResult: Result<Set<ChannelId>, any Error>?
class ChatChannelListController_Mock: ChatChannelListController, Spy {
let spyState = SpyState()
var loadNextChannelsIsCalled = false
var loadNextChannelsCallCount = 0
var resetChannelsQueryResult: Result<(synchedAndWatched: [ChatChannel], unwanted: Set<ChannelId>), Error>?
var refreshLoadedChannelsResult: Result<Set<ChannelId>, any Error>?

/// Creates a new mock instance of `ChatChannelListController`.
public static func mock(client: ChatClient? = nil) -> ChatChannelListController_Mock {
static func mock(client: ChatClient? = nil) -> ChatChannelListController_Mock {
.init(query: .init(filter: .equal(.memberCount, to: 0)), client: client ?? .mock())
}

public var channels_mock: [ChatChannel]?
override public var channels: LazyCachedMapCollection<ChatChannel> {
var channels_mock: [ChatChannel]?
override var channels: LazyCachedMapCollection<ChatChannel> {
channels_mock.map { $0.lazyCachedMap { $0 } } ?? super.channels
}

public var state_mock: State?
override public var state: DataController.State {
var state_mock: State?
override var state: DataController.State {
get { state_mock ?? super.state }
set { super.state = newValue }
}

override public func loadNextChannels(limit: Int?, completion: ((Error?) -> Void)?) {
override func loadNextChannels(limit: Int?, completion: ((Error?) -> Void)?) {
loadNextChannelsCallCount += 1
loadNextChannelsIsCalled = true
}

override public func refreshLoadedChannels(completion: @escaping (Result<Set<ChannelId>, any Error>) -> Void) {
override func refreshLoadedChannels(completion: @escaping (Result<Set<ChannelId>, any Error>) -> Void) {
record()
refreshLoadedChannelsResult.map(completion)
}

override public func resetQuery(
override func resetQuery(
watchedAndSynchedChannelIds: Set<ChannelId>,
synchedChannelIds: Set<ChannelId>,
completion: @escaping (Result<(synchedAndWatched: [ChatChannel], unwanted: Set<ChannelId>), Error>) -> Void
Expand All @@ -48,7 +48,7 @@ public class ChatChannelListController_Mock: ChatChannelListController, Spy {
}
}

public extension ChatChannelListController_Mock {
extension ChatChannelListController_Mock {
/// Simulates the initial conditions. Setting these values doesn't trigger any observer callback.
func simulateInitial(channels: [ChatChannel], state: DataController.State) {
channels_mock = channels
Expand Down
Loading

0 comments on commit 88c724b

Please sign in to comment.