Skip to content

Commit

Permalink
Ensure generated types (#303)
Browse files Browse the repository at this point in the history
Updates generated code and adds a CI step to check
that generated types are up to date.

Co-authored-by: Karl Bartel <[email protected]>
  • Loading branch information
piersy and karlb authored Jan 6, 2025
1 parent ba64a6c commit 74a6117
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,26 @@ jobs:

- name: Lint
run: make lint

Generate:
runs-on: ["ubuntu-latest"]
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.
# We need to use || true because currently we do not install protoc
# and protoc-gen-go which are required for generating some files,
# however despite this the non protobuf related types are generated.
run: |
go generate ./... || true
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
2 changes: 1 addition & 1 deletion core/gen_genesis.go

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

18 changes: 14 additions & 4 deletions core/tracing/gen_balance_change_reason_stringer.go

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

6 changes: 6 additions & 0 deletions core/types/gen_receipt_json.go

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

6 changes: 6 additions & 0 deletions eth/ethconfig/gen_config.go

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

0 comments on commit 74a6117

Please sign in to comment.