From bac852f26bccf06b81f9e73af03b434eff575439 Mon Sep 17 00:00:00 2001 From: Artur Troian Date: Tue, 30 Apr 2024 13:14:08 -0400 Subject: [PATCH] ci: ensure codegen check fails if file(s) changes detected Signed-off-by: Artur Troian --- .github/workflows/tests.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8fae65dd..a34b158d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -140,7 +140,11 @@ jobs: run: make codegen - name: Ensure no files changed/added/removed run: | - if [[ -z "$(git status --short)" ]]; then + git add . + git diff --exit-code --quiet HEAD -- + exit_status=$? + if [[ $exit_status -ne 0 ]]; then + echo "codegen test resulted in code changes\n\n" git status exit 1 fi