4343 schedule :
4444 - cron : " 3 */12 * * *"
4545 workflow_dispatch :
46+ inputs :
47+ specific_test :
48+ description : ' Specific Integration Test (passed to -Dtest=)'
49+ required : false
50+ type : string
4651
4752concurrency :
4853 group : ${{ github.workflow }}-${{ github.ref }}
@@ -101,6 +106,8 @@ jobs:
101106 java_unit_tests :
102107 name : Unit Tests
103108 needs : [java_build]
109+ # Skip if event is workflow_dispatch and inputs.specific_test is set.
110+ if : github.event_name != 'workflow_dispatch' || github.event.inputs.specific_test == ''
104111 timeout-minutes : 60
105112 runs-on : [self-hosted, spanner-it]
106113 steps :
@@ -133,7 +140,9 @@ jobs:
133140 uses : ./.github/actions/cleanup-java-env
134141 java_integration_smoke_tests_templates :
135142 name : Dataflow Templates Integration Smoke Tests
143+ # Skip if event is workflow_dispatch and inputs.specific_test is set.
136144 needs : [spotless_check, checkstyle_check, java_build, java_unit_tests]
145+ if : github.event_name != 'workflow_dispatch' || github.event.inputs.specific_test == ''
137146 timeout-minutes : 60
138147 # Run on any runner that matches all the specified runs-on values.
139148 runs-on : [self-hosted, spanner-it]
@@ -167,6 +176,12 @@ jobs:
167176 java_integration_tests_templates :
168177 name : Dataflow Templates Integration Tests
169178 needs : [java_integration_smoke_tests_templates]
179+ # Continue if previous workflows is skipped.
180+ if : |
181+ always() &&
182+ (contains(needs.*.result, 'success') || contains(needs.*.result, 'skipped')) &&
183+ !contains(needs.*.result, 'failure') &&
184+ !contains(needs.*.result, 'cancelled')
170185 timeout-minutes : 180
171186 # Run on any runner that matches all the specified runs-on values.
172187 runs-on : [self-hosted, spanner-it]
@@ -184,7 +199,8 @@ jobs:
184199 --it-project="span-cloud-teleport-testing" \
185200 --it-artifact-bucket="span-cloud-teleport-testing-it-gitactions" \
186201 --it-private-connectivity="datastream-connect-2" \
187- --it-cloud-proxy-host="10.128.0.16"
202+ --it-cloud-proxy-host="10.128.0.16" \
203+ --test="${{ github.event.inputs.specific_test }}"
188204 - name : Upload Integration Tests Report
189205 uses : actions/upload-artifact@v6
190206 if : always() # always run even if the previous step fails
0 commit comments