@@ -308,16 +308,20 @@ def run_tests(self, tests, python_version = None, force_run = False):
308
308
assert p .returncode == 0
309
309
310
310
commit_log = [o .split (' ' )[0 ] for o in out .split ('\n ' )]
311
- print (commit_log )
312
311
idx = next ((i for i ,c in enumerate (commit_log ) if c == self ._base ), len (commit_log ))
313
312
commit_log = commit_log [:idx + 1 ]
314
313
315
314
for t in tests :
316
315
pv = python_version or default_python_versions [t ]
317
316
key = (t , pv )
318
- if key in already_triggered_names :
319
- states .append (check_runs [key ]['conclusion' ])
320
- continue
317
+ if key in check_runs :
318
+ current_conclusion = check_runs [key ]['conclusion' ]
319
+ if current_conclusion :
320
+ workflow_id = int (check_runs [key ]['details_url' ].split ('/' )[- 1 ])
321
+ force_run = not self ._GAI .has_valid_artifacts (workflow_id )
322
+ if key in already_triggered_names and not force_run :
323
+ states .append (check_runs [key ]['conclusion' ])
324
+ continue
321
325
name = f"{ test_names [t ]} ({ t } , { pv } )"
322
326
if not force_run and not self .is_test_required (commit_log , name , t , states ):
323
327
continue
@@ -331,11 +335,14 @@ def run_tests(self, tests, python_version = None, force_run = False):
331
335
print (already_triggered_names , deps )
332
336
if all (d in success_names for d in deps ):
333
337
workflow_ids = None
338
+ ready = True
334
339
if t == 'coverage' :
335
340
print ([r ['details_url' ] for r in check_runs .values () if r ['conclusion' ] == "success" ])
336
341
workflow_ids = [int (r ['details_url' ].split ('/' )[- 1 ]) for r in check_runs .values () if r ['conclusion' ] == "success" and '(' in r ['name' ]]
337
- print ("Running test" )
338
- self .run_test (t , pv , posted ["id" ], workflow_ids )
342
+ ready = all (self ._GAI .has_valid_artifacts (w ) for w in workflow_ids )
343
+ if ready :
344
+ print ("Running test" )
345
+ self .run_test (t , pv , posted ["id" ], workflow_ids )
339
346
return states
340
347
341
348
def run_test (self , test , python_version , check_run_id , workflow_ids = None ):
0 commit comments