2727 description : Matrix of SLES distros, versions, and architectures to run the tests on
2828 required : false
2929 type : string
30+ windows_matrix :
31+ description : Matrix of Windows distros, versions, and architectures to run the tests on
32+ required : false
33+ type : string
3034 linux_test_report_name :
3135 description : Linux test report name
3236 required : false
6266 description : Matrix of SLES distros, versions, and architectures to run the tests on
6367 required : false
6468 type : string
69+ windows_matrix :
70+ description : Matrix of Windows distros, versions, and architectures to run the tests on
71+ required : false
72+ type : string
6573 linux_test_report_name :
6674 description : Linux test report name
6775 required : false
@@ -102,14 +110,14 @@ jobs:
102110 secrets : inherit
103111
104112 build_suse_packages :
105- needs : [spin_up_suse ]
113+ needs : [ spin_up_suse ]
106114 uses : ./.github/workflows/run_task.yml
107115 with :
108116 container_make_target : " ansible/build-fb-suse/run PRE_RELEASE_NAME=${{ inputs.pre_release_name }}"
109117 secrets : inherit
110118
111119 tear_down_suse :
112- needs : [build_suse_packages ]
120+ needs : [ build_suse_packages ]
113121 if : always()
114122 uses : ./.github/workflows/run_task.yml
115123 with :
@@ -144,10 +152,12 @@ jobs:
144152 run :
145153 gh release upload ${{ inputs.pre_release_name }} packages/* --clobber
146154
147-
148155 provision_and_execute_tests_linux :
149- name : Provision instances and run tests for linux
150- needs : [spin_up_test_executor_instances, sign_suse_packages, tear_down_suse]
156+ name : Provision instances and run tests for linux
157+ needs : [ spin_up_test_executor_instances, sign_suse_packages, tear_down_suse ]
158+ if : ${{ always() && !failure() && !cancelled()
159+ && (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped')
160+ && (needs.sign_suse_packages.result == 'success' || needs.sign_suse_packages.result == 'skipped')}}
151161 uses : ./.github/workflows/run_task.yml
152162 with :
153163 container_make_target : " ansible/provision-and-execute-tests/${{ inputs.infra_agent_env }}-linux PRE_RELEASE_NAME=${{ inputs.gh_release_name }} TEST_REPORT_NAME=${{ inputs.linux_test_report_name }}"
@@ -156,15 +166,17 @@ jobs:
156166 provision_and_execute_tests_windows :
157167 name : Provision instances and run tests for windows
158168 needs : spin_up_test_executor_instances
169+ if : ${{ (needs.spin_up_test_executor_instances.result == 'success' || needs.spin_up_test_executor_instances.result == 'skipped') && ( inputs.windows_matrix != '[]' ) }}
159170 uses : ./.github/workflows/run_task.yml
160171 with :
161172 container_make_target : " ansible/provision-and-execute-tests/${{ inputs.infra_agent_env }}-windows PRE_RELEASE_NAME=${{ inputs.gh_release_name }} TEST_REPORT_NAME=${{ inputs.windows_test_report_name }}"
162173 secrets : inherit
163174
164175 report_linux_test_results :
165- name : Report results
176+ name : Report results linux
166177 runs-on : ubuntu-20.04
167178 needs : [ provision_and_execute_tests_linux ]
179+ if : ${{ always() && !failure() && !cancelled() && (needs.provision_and_execute_tests_linux.result == 'success')}}
168180 env :
169181 GH_TOKEN : ${{ github.token }}
170182 steps :
@@ -190,9 +202,10 @@ jobs:
190202 ${{ inputs.linux_test_report_name }}
191203
192204 report_windows_test_results :
193- name : Report results
205+ name : Report results windows
194206 runs-on : ubuntu-20.04
195- needs : [provision_and_execute_tests_windows ]
207+ needs : [ provision_and_execute_tests_windows ]
208+ if : ${{ inputs.windows_matrix != '[]' }}
196209 env :
197210 GH_TOKEN : ${{ github.token }}
198211 steps :
@@ -220,7 +233,7 @@ jobs:
220233 tear_down_test_executor_instances :
221234 name : Tear down test executor instances
222235 if : always()
223- needs : [report_windows_test_results, report_linux_test_results]
236+ needs : [ report_windows_test_results, report_linux_test_results ]
224237 uses : ./.github/workflows/run_task.yml
225238 with :
226239 container_make_target : " terraform/ec2-test-executors/clean PRE_RELEASE_NAME=${{ inputs.gh_release_name }}"
0 commit comments