@@ -36,21 +36,40 @@ jobs:
3636 - name : Run Podspec Linting
3737 run : bundle exec fastlane pod_lint
3838
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 :
4060 name : Test SwiftUI (Debug)
4161 runs-on : macos-13
62+ needs : build-test-app-and-frameworks
4263 steps :
436444- - uses : actions/setup-python@v4
65+ - uses : actions/download-artifact@v3
4566 with :
46- python-version : 3.11
47- cache : ' pip '
67+ name : cache-derived-data
68+ path : derived_data/Build/
4869 - uses : ./.github/actions/bootstrap
49- env :
50- INSTALL_SONAR : true
51- INSTALL_XCPARSE : true
70+ - uses : ./.github/actions/python-cache
5271 - 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
5473 timeout-minutes : 40
5574 env :
5675 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -78,19 +97,23 @@ jobs:
7897 if : ${{ github.event_name == 'push' && failure() }}
7998 - name : Parse xcresult
8099 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
82103 - uses : actions/upload-artifact@v3
83104 if : failure()
84105 with :
85106 name : Test Data
86107 path : |
87108 fastlane/test_output/snapshots
88109
89- build-and- test-e2e-debug :
110+ test-e2e-debug :
90111 name : Test E2E UI (Debug)
91112 runs-on : macos-13
92113 if : ${{ github.event_name != 'push' }}
93- needs : allure_testops_launch
114+ needs :
115+ - allure_testops_launch
116+ - build-test-app-and-frameworks
94117 env :
95118 LAUNCH_ID : ${{ needs.allure_testops_launch.outputs.launch_id }}
96119 strategy :
@@ -99,15 +122,15 @@ jobs:
99122 fail-fast : false
100123 steps :
101124102- if : env.LAUNCH_ID != ''
125+ - uses : actions/download-artifact@v3
126+ with :
127+ name : cache-derived-data
128+ path : derived_data/Build/
103129 - uses : ./.github/actions/bootstrap
104- if : env.LAUNCH_ID != ''
105130 env :
106131 INSTALL_ALLURE : true
107- INSTALL_XCPARSE : true
108132 - 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
111134 env :
112135 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113136 GITHUB_PR_NUM : ${{ github.event.number }}
@@ -127,7 +150,9 @@ jobs:
127150 ALLURE_TOKEN : ${{ secrets.ALLURE_TOKEN }}
128151 - name : Parse xcresult
129152 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/
131156 - uses : actions/upload-artifact@v3
132157 if : failure()
133158 with :
@@ -145,9 +170,7 @@ jobs:
145170 launch_id : ${{ steps.get_launch_id.outputs.launch_id }}
146171 steps :
147172148- - uses : ./.github/actions/bootstrap
149- env :
150- XCODE_ACTIONS : false
173+ - uses : ./.github/actions/ruby-cache
151174 - name : Launch Allure TestOps
152175 run : bundle exec fastlane allure_launch
153176 env :
@@ -161,9 +184,15 @@ jobs:
161184 build-apps :
162185 name : Build Demo App
163186 runs-on : macos-13
187+ needs : build-test-app-and-frameworks
164188 if : ${{ github.event_name != 'push' }}
165189 steps :
166190167- - 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
168197 - name : Build Demo App
169198 run : bundle exec fastlane build_demo
0 commit comments