Skip to content

Commit

Permalink
ci: ensure codegen check fails if file(s) changes detected
Browse files Browse the repository at this point in the history
Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian committed Apr 30, 2024
1 parent 3383def commit 818b1a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 818b1a3

Please sign in to comment.