Skip to content

Commit

Permalink
CI: report error if the generated code has been modified, not generat…
Browse files Browse the repository at this point in the history
…ed or uncommitted
  • Loading branch information
mmetc committed Sep 24, 2024
1 parent 3945a99 commit 5e375c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ jobs:
with:
go-version: "1.22"

- name: Run "make generate" and check for changes
run: |
set -e
make generate 2>/dev/null
if [[ $(git status --porcelain) ]]; then
echo "Error: Uncommitted changes found after running 'make generate'. Please commit all generated code."
git diff
exit 1
else
echo "No changes detected after running 'make generate'."
fi
- name: Create localstack streams
run: |
aws --endpoint-url=http://127.0.0.1:4566 --region us-east-1 kinesis create-stream --stream-name stream-1-shard --shard-count 1
Expand Down
4 changes: 2 additions & 2 deletions pkg/database/ent/machine.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5e375c0

Please sign in to comment.