Skip to content

Commit

Permalink
fix: use allowed-failures and skips equally
Browse files Browse the repository at this point in the history
Before this patch, `allowed-failures` did not contribute to the

fix re-actors#23
  • Loading branch information
boromir674 committed Jul 21, 2024
1 parent 223e4bb commit dac9770
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/normalize_needed_jobs_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,17 @@ def main(argv):
return 1


allowed_outcome_map = {}
for job_name in jobs.keys():
allowed_outcome_map[job_name] = {'success'}
if job_name in jobs_allowed_to_be_skipped:
allowed_outcome_map[job_name].add('skipped')
if job_name in jobs_allowed_to_fail:
allowed_outcome_map[job_name].add('failure')

job_matrix_succeeded = all(
job['result'] == 'success' for name, job in jobs.items()
if name not in (jobs_allowed_to_fail | jobs_allowed_to_be_skipped)
) and all(
job['result'] in {'skipped', 'success'} for name, job in jobs.items()
if name in jobs_allowed_to_be_skipped
job['result'] in allowed_outcome_map[name]
for name, job in jobs.items()
)
set_final_result_outputs(job_matrix_succeeded)

Expand Down

0 comments on commit dac9770

Please sign in to comment.