Skip to content

Commit 4765557

Browse files
Bump xcode version and implement pod lint (#323)
1 parent 26c2745 commit 4765557

File tree

47 files changed

+139
-126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+139
-126
lines changed

.github/workflows/cron-checks.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
strategy:
2121
matrix:
2222
ios: [latest]
23-
device: ["iPhone 8", "iPhone SE (3rd generation)", "iPhone 14 Pro Max"]
23+
device: ["iPhone SE (3rd generation)", "iPhone 14", "iPhone 14 Pro Max"]
2424
fail-fast: false
25-
runs-on: macos-12
25+
runs-on: macos-13
2626
env:
2727
GITHUB_EVENT: ${{ toJson(github.event) }}
2828
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -57,7 +57,7 @@ jobs:
5757
env:
5858
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
5959
MATRIX_CONTEXT: ${{ toJson(matrix) }}
60-
if: failure()
60+
if: failure() && github.event_name == 'schedule'
6161
- name: Parse xcresult
6262
if: failure()
6363
run: xcparse logs fastlane/test_output/StreamChatSwiftUITestsApp.xcresult fastlane/test_output/logs/
@@ -75,15 +75,20 @@ jobs:
7575
name: Build Demo App
7676
strategy:
7777
matrix:
78-
xcode: [13.1, 13.4.1, 14.2]
79-
os: [macos-12]
78+
include:
79+
- xcode: 14.3
80+
os: macos-13
81+
- xcode: 14.2
82+
os: macos-12
8083
fail-fast: false
8184
runs-on: ${{ matrix.os }}
8285
steps:
8386
- uses: actions/[email protected]
8487
- uses: ./.github/actions/bootstrap
8588
- name: Build Demo App
8689
run: bundle exec fastlane build_demo
90+
env:
91+
XCODE_VERSION: ${{ matrix.xcode }}
8792
- uses: 8398a7/action-slack@v3
8893
with:
8994
status: ${{ job.status }}
@@ -93,13 +98,14 @@ jobs:
9398
env:
9499
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
95100
MATRIX_CONTEXT: ${{ toJson(matrix) }}
96-
if: failure()
101+
if: failure() && github.event_name == 'schedule'
97102

98103
automated-code-review:
99104
name: Automated Code Review
100-
runs-on: macos-12
105+
runs-on: macos-13
101106
steps:
102107
- uses: actions/[email protected]
103108
- uses: ./.github/actions/bootstrap
104109
- run: bundle exec fastlane rubocop
105110
- run: ./Scripts/run-linter.sh
111+
- run: bundle exec fastlane pod_lint

.github/workflows/smoke-checks.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ concurrency:
2121

2222
env:
2323
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI
24-
IOS_SIMULATOR_DEVICE: "iPhone 14 Pro (16.2)"
24+
IOS_SIMULATOR_DEVICE: "iPhone 14 Pro (16.4)"
2525

2626
jobs:
2727
automated-code-review:
2828
name: Automated Code Review
29-
runs-on: macos-12
29+
runs-on: macos-13
3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
GITHUB_PR_NUM: ${{ github.event.number }}
@@ -38,12 +38,14 @@ jobs:
3838
run: bundle exec danger
3939
- name: Run Fastlane Linting
4040
run: bundle exec fastlane rubocop
41-
- name: Run Linting
41+
- name: Run SwiftFormat Linting
4242
run: ./Scripts/run-linter.sh
43+
- name: Run Podspec Linting
44+
run: bundle exec fastlane pod_lint
4345

4446
build-and-test-ui-debug:
4547
name: Test SwiftUI (Debug)
46-
runs-on: macos-12
48+
runs-on: macos-13
4749
steps:
4850
- uses: actions/[email protected]
4951
- uses: actions/[email protected]
@@ -93,7 +95,7 @@ jobs:
9395
9496
build-and-test-e2e-debug:
9597
name: Test E2E UI (Debug)
96-
runs-on: macos-12
98+
runs-on: macos-13
9799
if: ${{ github.event_name != 'push' }}
98100
needs: allure_testops_launch
99101
env:
@@ -142,7 +144,7 @@ jobs:
142144
143145
allure_testops_launch:
144146
name: Launch Allure TestOps
145-
runs-on: macos-12
147+
runs-on: macos-13
146148
if: ${{ github.event_name != 'push' }}
147149
outputs:
148150
launch_id: ${{ steps.get_launch_id.outputs.launch_id }}
@@ -163,7 +165,7 @@ jobs:
163165

164166
build-apps:
165167
name: Build Demo App
166-
runs-on: macos-12
168+
runs-on: macos-13
167169
if: ${{ github.event_name != 'push' }}
168170
steps:
169171
- uses: actions/[email protected]

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2724,8 +2724,8 @@
27242724
isa = XCRemoteSwiftPackageReference;
27252725
repositoryURL = "https://github.com/pointfreeco/swift-snapshot-testing.git";
27262726
requirement = {
2727-
kind = upToNextMajorVersion;
2728-
minimumVersion = 1.8.2;
2727+
kind = exactVersion;
2728+
version = 1.11.0;
27292729
};
27302730
};
27312731
84E95A75284A486600699FD3 /* XCRemoteSwiftPackageReference "stream-chat-swift" */ = {

StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/AddUsersView_Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ class AddUsersView_Tests: StreamChatTestCase {
2525
.applyDefaultSize()
2626

2727
// Then
28-
assertSnapshot(matching: view, as: .image)
28+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
2929
}
3030
}

StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/ChatChannelInfoView_Tests.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
2626
.applyDefaultSize()
2727

2828
// Then
29-
assertSnapshot(matching: view, as: .image)
29+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
3030
}
3131

3232
func test_chatChannelInfoView_directChannelOnlineSnapshot() {
@@ -46,7 +46,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
4646
.applyDefaultSize()
4747

4848
// Then
49-
assertSnapshot(matching: view, as: .image)
49+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
5050
}
5151

5252
func test_chatChannelInfoView_directChannelMutedSnapshot() {
@@ -66,7 +66,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
6666
.applyDefaultSize()
6767

6868
// Then
69-
assertSnapshot(matching: view, as: .image)
69+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
7070
}
7171

7272
func test_chatChannelInfoView_groupCollapsedSnapshot() {
@@ -89,7 +89,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
8989
.applyDefaultSize()
9090

9191
// Then
92-
assertSnapshot(matching: view, as: .image)
92+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
9393
}
9494

9595
func test_chatChannelInfoView_smallGroupSnapshot() {
@@ -112,7 +112,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
112112
.applyDefaultSize()
113113

114114
// Then
115-
assertSnapshot(matching: view, as: .image)
115+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
116116
}
117117

118118
func test_chatChannelInfoView_groupExpandedSnapshot() {
@@ -137,7 +137,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
137137
.applyDefaultSize()
138138

139139
// Then
140-
assertSnapshot(matching: view, as: .image)
140+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
141141
}
142142

143143
func test_chatChannelInfoView_navBarSnapshot() {
@@ -166,7 +166,7 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
166166
.applyDefaultSize()
167167

168168
// Then
169-
assertSnapshot(matching: navigationView, as: .image)
169+
assertSnapshot(matching: navigationView, as: .image(perceptualPrecision: 0.98))
170170
}
171171

172172
func test_chatChannelInfoView_addUsersShownSnapshot() {
@@ -191,6 +191,6 @@ class ChatChannelInfoView_Tests: StreamChatTestCase {
191191
.applyDefaultSize()
192192

193193
// Then
194-
assertSnapshot(matching: view, as: .image)
194+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
195195
}
196196
}

StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/FileAttachmentsView_Tests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
2525
.applyDefaultSize()
2626

2727
// Then
28-
assertSnapshot(matching: view, as: .image)
28+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
2929
}
3030

3131
func test_fileAttachmentsView_emptySnapshot() {
@@ -40,7 +40,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
4040
.applyDefaultSize()
4141

4242
// Then
43-
assertSnapshot(matching: view, as: .image)
43+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
4444
}
4545

4646
func test_fileAttachmentsView_loadingSnapshot() {
@@ -55,7 +55,7 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
5555
.applyDefaultSize()
5656

5757
// Then
58-
assertSnapshot(matching: view, as: .image)
58+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
5959
}
6060

6161
func test_fileAttachmentsPickerView_snapshot() {
@@ -64,6 +64,6 @@ class FileAttachmentsView_Tests: StreamChatTestCase {
6464
.applyDefaultSize()
6565

6666
// Then
67-
assertSnapshot(matching: view, as: .image)
67+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
6868
}
6969
}

StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/MediaAttachmentsView_Tests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MediaAttachmentsView_Tests: StreamChatTestCase {
2828
.applyDefaultSize()
2929

3030
// Then
31-
assertSnapshot(matching: view, as: .image)
31+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
3232
}
3333

3434
func test_mediaAttachmentsView_emptySnapshot() {
@@ -41,7 +41,7 @@ class MediaAttachmentsView_Tests: StreamChatTestCase {
4141
.applyDefaultSize()
4242

4343
// Then
44-
assertSnapshot(matching: view, as: .image)
44+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
4545
}
4646

4747
func test_mediaAttachmentsView_loading() {
@@ -54,6 +54,6 @@ class MediaAttachmentsView_Tests: StreamChatTestCase {
5454
.applyDefaultSize()
5555

5656
// Then
57-
assertSnapshot(matching: view, as: .image)
57+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
5858
}
5959
}

StreamChatSwiftUITests/Tests/ChatChannel/ChannelInfo/PinnedMessagesView_Tests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PinnedMessagesView_Tests: StreamChatTestCase {
2727
.applyDefaultSize()
2828

2929
// Then
30-
assertSnapshot(matching: view, as: .image)
30+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
3131
}
3232

3333
func test_pinnedMessagesView_emptySnapshot() {
@@ -39,7 +39,7 @@ class PinnedMessagesView_Tests: StreamChatTestCase {
3939
.applyDefaultSize()
4040

4141
// Then
42-
assertSnapshot(matching: view, as: .image)
42+
assertSnapshot(matching: view, as: .image(perceptualPrecision: 0.98))
4343
}
4444
}
4545

Loading
Loading

0 commit comments

Comments
 (0)