16
16
required : false
17
17
type : boolean
18
18
default : false
19
+ retry_on_error :
20
+ description : ' Whether to automatically retry if the tests fail'
21
+ required : false
22
+ type : boolean
23
+ default : true
24
+ other_flags :
25
+ required : false
26
+ type : string
27
+ default : ' '
19
28
20
29
env :
21
30
SCHEME : ${{ inputs.scheme }}
31
+ RETRY_ON_ERROR : ${{ inputs.retry_on_error }}
22
32
23
33
permissions :
24
34
contents : read
50
60
key : ${{ env.SCHEME }}-iOS-build-${{ github.sha }}
51
61
- name : Run iOS Test Suite
52
62
id : run-tests
53
- continue-on-error : true
63
+ continue-on-error : ${{ env.RETRY_ON_ERROR == ' true' }}
54
64
uses : ./.github/composite_actions/run_xcodebuild_test
55
65
with :
56
66
scheme : ${{ env.SCHEME }}
61
71
derived_data_path : ${{ github.workspace }}/Build
62
72
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
63
73
test_without_building : ${{ steps.restore-build.outputs.cache-hit }}
74
+ other_flags : ${{ inputs.other_flags }}
64
75
- name : Retry iOS Test Suite if needed
65
- if : steps.run-tests.outcome=='failure'
76
+ if : inputs.retry_on_error == 'true' && steps.run-tests.outcome=='failure'
66
77
id : retry-tests
67
78
uses : ./.github/composite_actions/run_xcodebuild_test
68
79
with :
74
85
derived_data_path : ${{ github.workspace }}/Build
75
86
disable_package_resolution : true
76
87
test_without_building : true
88
+ other_flags : ${{ inputs.other_flags }}
77
89
- name : Save the build cache for re-runs
78
90
if : failure() && steps.retry-tests.outcome=='failure'
79
91
uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
@@ -116,7 +128,7 @@ jobs:
116
128
key : ${{ env.SCHEME }}-macOS-build-${{ github.sha }}
117
129
- name : Run macOS Test Suite
118
130
id : run-tests
119
- continue-on-error : true
131
+ continue-on-error : ${{ env.RETRY_ON_ERROR == ' true' }}
120
132
uses : ./.github/composite_actions/run_xcodebuild_test
121
133
with :
122
134
scheme : ${{ env.SCHEME }}
@@ -127,8 +139,9 @@ jobs:
127
139
derived_data_path : ${{ github.workspace }}/Build
128
140
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
129
141
test_without_building : ${{ steps.restore-build.outputs.cache-hit }}
142
+ other_flags : ${{ inputs.other_flags }}
130
143
- name : Retry macOS Test Suite if needed
131
- if : steps.run-tests.outcome=='failure'
144
+ if : inputs.retry_on_error == 'true' && steps.run-tests.outcome=='failure'
132
145
id : retry-tests
133
146
uses : ./.github/composite_actions/run_xcodebuild_test
134
147
with :
@@ -140,6 +153,7 @@ jobs:
140
153
derived_data_path : ${{ github.workspace }}/Build
141
154
disable_package_resolution : true
142
155
test_without_building : true
156
+ other_flags : ${{ inputs.other_flags }}
143
157
- name : Save the build cache for re-runs
144
158
if : failure() && steps.retry-tests.outcome=='failure'
145
159
uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
@@ -173,7 +187,7 @@ jobs:
173
187
key : ${{ env.SCHEME }}-tvOS-build-${{ github.sha }}
174
188
- name : Run tvOS Test Suite
175
189
id : run-tests
176
- continue-on-error : true
190
+ continue-on-error : ${{ env.RETRY_ON_ERROR == ' true' }}
177
191
uses : ./.github/composite_actions/run_xcodebuild_test
178
192
with :
179
193
scheme : ${{ env.SCHEME }}
@@ -184,8 +198,9 @@ jobs:
184
198
derived_data_path : ${{ github.workspace }}/Build
185
199
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
186
200
test_without_building : ${{ steps.restore-build.outputs.cache-hit }}
201
+ other_flags : ${{ inputs.other_flags }}
187
202
- name : Retry tvOS Test Suite if needed
188
- if : steps.run-tests.outcome=='failure'
203
+ if : inputs.retry_on_error == 'true' && steps.run-tests.outcome=='failure'
189
204
id : retry-tests
190
205
uses : ./.github/composite_actions/run_xcodebuild_test
191
206
with :
@@ -197,6 +212,7 @@ jobs:
197
212
derived_data_path : ${{ github.workspace }}/Build
198
213
disable_package_resolution : true
199
214
test_without_building : true
215
+ other_flags : ${{ inputs.other_flags }}
200
216
- name : Save the build cache for re-runs
201
217
if : failure() && steps.retry-tests.outcome=='failure'
202
218
uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
@@ -230,7 +246,7 @@ jobs:
230
246
key : ${{ env.SCHEME }}-watchOS-build-${{ github.sha }}
231
247
- name : Run watchOS Test Suite
232
248
id : run-tests
233
- continue-on-error : true
249
+ continue-on-error : ${{ env.RETRY_ON_ERROR == ' true' }}
234
250
uses : ./.github/composite_actions/run_xcodebuild_test
235
251
with :
236
252
scheme : ${{ env.SCHEME }}
@@ -241,8 +257,9 @@ jobs:
241
257
derived_data_path : ${{ github.workspace }}/Build
242
258
disable_package_resolution : ${{ steps.cache-packages.outputs.cache-hit }}
243
259
test_without_building : ${{ steps.restore-build.outputs.cache-hit }}
260
+ other_flags : ${{ inputs.other_flags }}
244
261
- name : Retry watchOS Test Suite if needed
245
- if : steps.run-tests.outcome=='failure'
262
+ if : inputs.retry_on_error == 'true' && steps.run-tests.outcome=='failure'
246
263
id : retry-tests
247
264
uses : ./.github/composite_actions/run_xcodebuild_test
248
265
with :
@@ -254,6 +271,7 @@ jobs:
254
271
derived_data_path : ${{ github.workspace }}/Build
255
272
disable_package_resolution : true
256
273
test_without_building : true
274
+ other_flags : ${{ inputs.other_flags }}
257
275
- name : Save the build cache for re-runs
258
276
if : failure() && steps.retry-tests.outcome=='failure'
259
277
uses : actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
0 commit comments