Skip to content

Commit

Permalink
feat(ci): introduce check-proto.yaml workflow (#287)
Browse files Browse the repository at this point in the history
* feat(ci): introduce `check-proto.yaml` workflow

This workflow runs the `protocgen.sh` script via the Makefile and fails
if any files have changed

* fix(delegation): remove proto warning

The `repeated string` type is never nullable

* chore(dogfood): regen the query.proto go files
  • Loading branch information
MaxMustermann2 authored Jan 22, 2025
1 parent 4225ead commit 4e54112
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 81 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check-proto.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check Proto Generation

on:
pull_request:
push:
branches:
- develop
- main
- master

permissions:
contents: read

jobs:
check-proto:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v4

# Run proto generation
- name: Run proto-gen
run: make proto-gen

- name: Check if any files have changed post regeneration
run: |
if ! git diff --exit-code > /dev/null 2>&1; then
echo "Changes detected after running 'make proto-gen'."
git diff
exit 1
fi
2 changes: 1 addition & 1 deletion proto/exocore/delegation/v1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ message StakersByOperator {
// which is a combination of the operator address and the asset ID.
string key = 1;
// stakers is the stakers list for the above key
repeated string stakers = 2 [(gogoproto.nullable) = false];
repeated string stakers = 2;
}

// DelegationsByStaker is a list of delegations for a single staker.
Expand Down
62 changes: 31 additions & 31 deletions x/delegation/types/genesis.pb.go

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

86 changes: 43 additions & 43 deletions x/dogfood/types/query.pb.go

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

12 changes: 6 additions & 6 deletions x/dogfood/types/query.pb.gw.go

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

0 comments on commit 4e54112

Please sign in to comment.