Skip to content

Commit

Permalink
Fix duplicate test report in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
JackyWoo committed Sep 25, 2024
1 parent 8edfb71 commit 3e16ba6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@
# Report to PR comment
def report(report_dir, report_type):
content = None
title = None
title_prefix = None

if report_type == 'unit':
title = f"Unit test report"
title_prefix = f"Unit test report"
elif report_type == 'integration':
title = f"Integration test report"
title_prefix = f"Integration test report"
else:
raise ValueError('Integration test report not available')

content = generate_report(report_dir, title)
title_prefix_copy = title_prefix
content = generate_report(report_dir, title_prefix)
if content is not None:
comment_on_pr(content, title)
comment_on_pr(content, title_prefix_copy)


if __name__ == "__main__":
report(sys.argv[1], sys.argv[2])

0 comments on commit 3e16ba6

Please sign in to comment.