@@ -74,18 +74,25 @@ jobs:
74
74
- name : Checkout Git Repository
75
75
uses : actions/checkout@v2
76
76
77
+ - name : Check if acceptance tests can be skipped
78
+ id : check-skip-acceptance
79
+ uses : ./.github/actions/check-skip-acceptance-tests
80
+
77
81
- name : Set up Python
82
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
78
83
uses : actions/setup-python@v2
79
84
with :
80
85
python-version : " 3.7"
81
86
architecture : " x64"
82
87
83
88
- name : Setup-cli
89
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
84
90
uses : ./.github/actions/setup-cli
85
91
with :
86
92
start-minikube : true
87
93
88
94
- name : Wait for push
95
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
89
96
uses : lewagon/wait-on-check-action@1b1630e169116b58a4b933d5ad7effc46d3d312d
90
97
with :
91
98
ref : ${{ github.event.pull_request.head.sha }}
@@ -94,11 +101,13 @@ jobs:
94
101
wait-interval : 60
95
102
96
103
- name : Extract image references
104
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
97
105
uses :
marcofaggian/[email protected]
98
106
with :
99
107
names : operator-refs-${{github.event.pull_request.number}}-${{github.event.pull_request.head.sha}}
100
108
101
109
- name : Acceptance tests
110
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
102
111
timeout-minutes : 60
103
112
run : |
104
113
source ./operator.refs
@@ -107,31 +116,31 @@ jobs:
107
116
make SKIP_REGISTRY_LOGIN=true -o registry-login test-acceptance-with-bundle
108
117
109
118
- name : Collect Kube resources
119
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
110
120
continue-on-error : true
111
121
uses : ./.github/actions/collect-kube-resources
112
122
with :
113
123
operator-namespace : operators
114
124
olm-namespace : olm
115
125
test-namespace-file : out/test-namespace
116
126
output-path : ${{env.TEST_RESULTS}}
117
- if : always()
118
127
119
128
- name : Setup Testspace
129
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
120
130
uses : testspace-com/setup-testspace@v1
121
131
with :
122
132
domain : ${{ github.repository_owner }}
123
- if : always()
124
133
125
134
- name : Publish tests results to Testspace
135
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
126
136
run : |
127
137
testspace [${{ env.TEST_RUN }}]${{ env.TEST_RESULTS }}/TEST*.xml
128
- if : always()
129
138
130
139
- uses : actions/upload-artifact@v2
140
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
131
141
with :
132
142
name : kubernetes-with-olm-test-results
133
143
path : ${{ env.TEST_RESULTS }}
134
- if : always()
135
144
136
145
acceptance-supported-operators :
137
146
name : Supported Operators Acceptance Tests with Kubernetes and using OLM
@@ -145,18 +154,25 @@ jobs:
145
154
- name : Checkout Git Repository
146
155
uses : actions/checkout@v2
147
156
157
+ - name : Check if acceptance tests can be skipped
158
+ id : check-skip-acceptance
159
+ uses : ./.github/actions/check-skip-acceptance-tests
160
+
148
161
- name : Set up Python
162
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
149
163
uses : actions/setup-python@v2
150
164
with :
151
165
python-version : " 3.7"
152
166
architecture : " x64"
153
167
154
168
- name : Setup-cli
169
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
155
170
uses : ./.github/actions/setup-cli
156
171
with :
157
172
start-minikube : true
158
173
159
174
- name : Wait for push
175
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
160
176
uses : lewagon/wait-on-check-action@1b1630e169116b58a4b933d5ad7effc46d3d312d
161
177
with :
162
178
ref : ${{ github.event.pull_request.head.sha }}
@@ -165,11 +181,13 @@ jobs:
165
181
wait-interval : 60
166
182
167
183
- name : Extract image references
184
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
168
185
uses :
marcofaggian/[email protected]
169
186
with :
170
187
names : operator-refs-${{github.event.pull_request.number}}-${{github.event.pull_request.head.sha}}
171
188
172
189
- name : Acceptance tests
190
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
173
191
timeout-minutes : 60
174
192
run : |
175
193
source ./operator.refs
@@ -178,31 +196,31 @@ jobs:
178
196
make SKIP_REGISTRY_LOGIN=true -o registry-login test-acceptance-with-bundle
179
197
180
198
- name : Collect Kube resources
199
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
181
200
continue-on-error : true
182
201
uses : ./.github/actions/collect-kube-resources
183
202
with :
184
203
operator-namespace : operators
185
204
olm-namespace : olm
186
205
test-namespace-file : out/test-namespace
187
206
output-path : ${{env.TEST_RESULTS}}
188
- if : always()
189
207
190
208
- name : Setup Testspace
209
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
191
210
uses : testspace-com/setup-testspace@v1
192
211
with :
193
212
domain : ${{ github.repository_owner }}
194
- if : always()
195
213
196
214
- name : Publish tests results to Testspace
215
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
197
216
run : |
198
217
testspace [${{ env.TEST_RUN }}]${{ env.TEST_RESULTS }}/TEST*.xml
199
- if : always()
200
218
201
219
- uses : actions/upload-artifact@v2
220
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
202
221
with :
203
222
name : supported-operators-kubernetes
204
223
path : ${{ env.TEST_RESULTS }}
205
- if : always()
206
224
207
225
acceptance_without_olm :
208
226
name : Acceptance tests running on Kubernetes without using OLM
@@ -217,29 +235,38 @@ jobs:
217
235
- name : Checkout Git Repository
218
236
uses : actions/checkout@v2
219
237
238
+ - name : Check if acceptance tests can be skipped
239
+ id : check-skip-acceptance
240
+ uses : ./.github/actions/check-skip-acceptance-tests
241
+
220
242
- name : Set up Python
243
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
221
244
uses : actions/setup-python@v2
222
245
with :
223
246
python-version : " 3.7"
224
247
architecture : " x64"
225
248
226
249
- name : Set up CLI
250
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
227
251
uses : ./.github/actions/setup-cli
228
252
with :
229
253
start-minikube : true
230
254
231
255
- name : Set up Go
256
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
232
257
uses : actions/setup-go@v2
233
258
with :
234
259
go-version : " ^1.16"
235
260
236
261
- name : Setup umoci cli
262
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
237
263
run : |
238
264
curl -Lo umoci https://github.com/opencontainers/umoci/releases/download/v${UMOCI_VERSION}/umoci.amd64
239
265
chmod +x umoci
240
266
mv -v umoci $GITHUB_WORKSPACE/bin/
241
267
242
268
- name : Wait for push
269
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
243
270
uses : lewagon/wait-on-check-action@1b1630e169116b58a4b933d5ad7effc46d3d312d
244
271
with :
245
272
ref : ${{ github.event.pull_request.head.sha }}
@@ -248,11 +275,13 @@ jobs:
248
275
wait-interval : 60
249
276
250
277
- name : Extract image references
278
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
251
279
uses :
marcofaggian/[email protected]
252
280
with :
253
281
names : operator-refs-${{github.event.pull_request.number}}-${{github.event.pull_request.head.sha}}
254
282
255
283
- name : Acceptance tests against vanilla k8s without OLM
284
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
256
285
timeout-minutes : 60
257
286
run : |
258
287
source ./operator.refs
@@ -264,30 +293,30 @@ jobs:
264
293
make TEST_ACCEPTANCE_START_SBO=remote test-acceptance
265
294
266
295
- name : Collect Kube resources
296
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
267
297
continue-on-error : true
268
298
uses : ./.github/actions/collect-kube-resources
269
299
with :
270
300
operator-namespace : service-binding-operator
271
301
test-namespace-file : out/test-namespace
272
302
output-path : ${{env.TEST_RESULTS}}
273
- if : always()
274
303
275
304
- name : Setup Testspace
305
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
276
306
uses : testspace-com/setup-testspace@v1
277
307
with :
278
308
domain : ${{ github.repository_owner }}
279
- if : always()
280
309
281
310
- name : Publish tests results to Testspace
311
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
282
312
run : |
283
313
testspace [${{ env.TEST_RUN }}]${{ env.TEST_RESULTS }}/TEST*.xml
284
- if : always()
285
314
286
315
- uses : actions/upload-artifact@v2
316
+ if : ${{ steps.check-skip-acceptance.outputs.can_skip != 'true' }}
287
317
with :
288
318
name : kubernetes-without-olm-test-results
289
319
path : ${{ env.TEST_RESULTS }}
290
- if : always()
291
320
292
321
single-commit :
293
322
name : Single commit PR
0 commit comments