From d9baa0b1f7f9440f59dd7609ac1fdf772636996b Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Thu, 21 Jul 2022 18:25:22 +0200 Subject: [PATCH] Finish following runs with the same exit code as the first --- tests/ci/style_check.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ci/style_check.py b/tests/ci/style_check.py index 0d619d28526..7ba0dc2a297 100644 --- a/tests/ci/style_check.py +++ b/tests/ci/style_check.py @@ -153,7 +153,11 @@ if __name__ == "__main__": rerun_helper = RerunHelper(gh, pr_info, NAME) if rerun_helper.is_already_finished_by_status(): logging.info("Check is already finished according to github status, exiting") - sys.exit(0) + # Finish with the same code as previous + state = rerun_helper.get_finished_status().state # type: ignore + # state == "success" -> code = 0 + code = int(state != "success") + sys.exit(code) if not os.path.exists(temp_path): os.makedirs(temp_path)