Skip to content

Commit

Permalink
Add CI step to check code has been generated
Browse files Browse the repository at this point in the history
  • Loading branch information
piersy committed Dec 21, 2024
1 parent 8103ded commit a48d67f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,22 @@ jobs:

- name: Lint
run: make lint

Generate:
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false

- name: Generate check
# Run go generate and see if anything changed.
run: |
go generate ./...
if [ -n "$(git status --porcelain)" ]; then
echo "Changes detected after running 'go generate ./...' run generate locally and commit the changes."
exit 1
fi
shell: sh

0 comments on commit a48d67f

Please sign in to comment.