From aaa899139b15d10e01f54255d7cdadb1377f59db Mon Sep 17 00:00:00 2001 From: drbh Date: Tue, 2 Jul 2024 15:42:20 +0000 Subject: [PATCH] fix: adjust raise condition and install server in ci --- .github/workflows/autodocs.yaml | 4 ++++ update_doc.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/autodocs.yaml b/.github/workflows/autodocs.yaml index ee3dc0c606d..eafa7f52def 100644 --- a/.github/workflows/autodocs.yaml +++ b/.github/workflows/autodocs.yaml @@ -20,6 +20,10 @@ jobs: echo text-generation-launcher --help python update_doc.py md --check + - name: Install + run: | + make install-cpu + - name: Check that openapi schema is up-to-date run: | python update_doc.py openapi --check diff --git a/update_doc.py b/update_doc.py index a0f7598df5f..f4ac12908d2 100644 --- a/update_doc.py +++ b/update_doc.py @@ -237,12 +237,16 @@ def openapi(check: bool): except TimeoutError as e: print(f"Error: {e}") + raise SystemExit(1) except requests.RequestException as e: print(f"Error communicating with the server: {e}") + raise SystemExit(1) except json.JSONDecodeError: print("Error: Invalid JSON received from the server") + raise SystemExit(1) except Exception as e: print(f"An unexpected error occurred: {e}") + raise SystemExit(1) if __name__ == "__main__":