@@ -36,21 +36,40 @@ jobs:
36
36
- name : Run Podspec Linting
37
37
run : bundle exec fastlane pod_lint
38
38
39
- build-and-test-ui-debug :
39
+ build-test-app-and-frameworks :
40
+ name : Build Test App and Frameworks
41
+ runs-on : macos-13
42
+ if : ${{ github.event_name != 'push' }}
43
+ steps :
44
+
45
+ - uses : ./.github/actions/ruby-cache
46
+ - uses : ./.github/actions/xcode-cache
47
+ - name : Build
48
+ run : bundle exec fastlane build_test_app_and_frameworks
49
+ timeout-minutes : 60
50
+ - uses : actions/upload-artifact@v3
51
+ if : success()
52
+ with :
53
+ name : cache-derived-data
54
+ path : |
55
+ derived_data/Build/**/*.app
56
+ derived_data/Build/**/*.xctestrun
57
+ derived_data/Build/**/*.framework
58
+
59
+ test-ui-debug :
40
60
name : Test SwiftUI (Debug)
41
61
runs-on : macos-13
62
+ needs : build-test-app-and-frameworks
42
63
steps :
43
64
44
- - uses : actions/setup-python@v4
65
+ - uses : actions/download-artifact@v3
45
66
with :
46
- python-version : 3.11
47
- cache : ' pip '
67
+ name : cache-derived-data
68
+ path : derived_data/Build/
48
69
- uses : ./.github/actions/bootstrap
49
- env :
50
- INSTALL_SONAR : true
51
- INSTALL_XCPARSE : true
70
+ - uses : ./.github/actions/python-cache
52
71
- name : Run UI Tests (Debug)
53
- run : bundle exec fastlane test_ui device:"${{ env.IOS_SIMULATOR_DEVICE }}"
72
+ run : bundle exec fastlane test_ui device:"${{ env.IOS_SIMULATOR_DEVICE }}" skip_build:true
54
73
timeout-minutes : 40
55
74
env :
56
75
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -78,19 +97,23 @@ jobs:
78
97
if : ${{ github.event_name == 'push' && failure() }}
79
98
- name : Parse xcresult
80
99
if : failure()
81
- run : xcparse screenshots fastlane/test_output/StreamChatSwiftUI.xcresult fastlane/test_output/snapshots --test
100
+ run : |
101
+ brew install chargepoint/xcparse/xcparse
102
+ xcparse screenshots fastlane/test_output/StreamChatSwiftUI.xcresult fastlane/test_output/snapshots --test
82
103
- uses : actions/upload-artifact@v3
83
104
if : failure()
84
105
with :
85
106
name : Test Data
86
107
path : |
87
108
fastlane/test_output/snapshots
88
109
89
- build-and- test-e2e-debug :
110
+ test-e2e-debug :
90
111
name : Test E2E UI (Debug)
91
112
runs-on : macos-13
92
113
if : ${{ github.event_name != 'push' }}
93
- needs : allure_testops_launch
114
+ needs :
115
+ - allure_testops_launch
116
+ - build-test-app-and-frameworks
94
117
env :
95
118
LAUNCH_ID : ${{ needs.allure_testops_launch.outputs.launch_id }}
96
119
strategy :
@@ -99,15 +122,15 @@ jobs:
99
122
fail-fast : false
100
123
steps :
101
124
102
- if : env.LAUNCH_ID != ''
125
+ - uses : actions/download-artifact@v3
126
+ with :
127
+ name : cache-derived-data
128
+ path : derived_data/Build/
103
129
- uses : ./.github/actions/bootstrap
104
- if : env.LAUNCH_ID != ''
105
130
env :
106
131
INSTALL_ALLURE : true
107
- INSTALL_XCPARSE : true
108
132
- name : Run UI Tests (Debug)
109
- if : env.LAUNCH_ID != ''
110
- run : bundle exec fastlane test_e2e_mock device:"${{ env.IOS_SIMULATOR_DEVICE }}" batch:'${{ matrix.batch }}'
133
+ run : bundle exec fastlane test_e2e_mock device:"${{ env.IOS_SIMULATOR_DEVICE }}" batch:'${{ matrix.batch }}' test_without_building:true
111
134
env :
112
135
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113
136
GITHUB_PR_NUM : ${{ github.event.number }}
@@ -127,7 +150,9 @@ jobs:
127
150
ALLURE_TOKEN : ${{ secrets.ALLURE_TOKEN }}
128
151
- name : Parse xcresult
129
152
if : failure()
130
- run : xcparse logs fastlane/test_output/StreamChatSwiftUITestsApp.xcresult fastlane/test_output/logs/
153
+ run : |
154
+ brew install chargepoint/xcparse/xcparse
155
+ xcparse logs fastlane/test_output/StreamChatUITestsApp.xcresult fastlane/test_output/logs/
131
156
- uses : actions/upload-artifact@v3
132
157
if : failure()
133
158
with :
@@ -145,9 +170,7 @@ jobs:
145
170
launch_id : ${{ steps.get_launch_id.outputs.launch_id }}
146
171
steps :
147
172
148
- - uses : ./.github/actions/bootstrap
149
- env :
150
- XCODE_ACTIONS : false
173
+ - uses : ./.github/actions/ruby-cache
151
174
- name : Launch Allure TestOps
152
175
run : bundle exec fastlane allure_launch
153
176
env :
@@ -161,9 +184,15 @@ jobs:
161
184
build-apps :
162
185
name : Build Demo App
163
186
runs-on : macos-13
187
+ needs : build-test-app-and-frameworks
164
188
if : ${{ github.event_name != 'push' }}
165
189
steps :
166
190
167
- - uses : ./.github/actions/bootstrap
191
+ - uses : actions/download-artifact@v3
192
+ with :
193
+ name : cache-derived-data
194
+ path : derived_data/Build/
195
+ - uses : ./.github/actions/ruby-cache
196
+ - uses : ./.github/actions/xcode-cache
168
197
- name : Build Demo App
169
198
run : bundle exec fastlane build_demo
0 commit comments