Skip to content

Commit

Permalink
Make generated proto files be committed from CI (#5982)
Browse files Browse the repository at this point in the history
* Try committing result

* fix indent

* fix cmd

* try-token

* Tryfix

* try again

* Try again

* try docs suggested method

* try simpler thing

* ah wrong perms at top

* try agian

* Try actions/checkout#317

* try actions/checkout#719

* Generated protofile changes

* Try again

* Generated protofile changes

* use proper paths filtering

* Make it do make proto-all

* Rename workflow, add go.sum to diff list

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: devbot-wizard <[email protected]>
  • Loading branch information
3 people authored Aug 8, 2023
1 parent 2c3f197 commit 9c2a991
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 28 deletions.
54 changes: 26 additions & 28 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# Verify that generated code is up-to-date.
#
# Note that we run these checks regardless whether the input files have
# changed, because generated code can change in response to toolchain updates
# even if no files in the repository are modified.
name: Check generated code
# Ensure that generated code is up-to-date.
name: Generate protobuf code

on:
workflow_dispatch:
pull_request:
branches:
- '*'
paths:
- 'proto/**'
- '**/**.proto'
- '**/**.pb.go'
- '**/**.sum'
- '**/client/**.go'
- 'scripts/ci/**'
- 'Makefile'
- 'Dockerfile'
- '.github/workflows/check-generated.yml'

permissions:
contents: read
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -25,24 +29,18 @@ jobs:
-
uses: actions/checkout@v3
with:
fetch-depth: 1 # we need a .git directory to run git diff
-
name: Get git diff
uses: technote-space/[email protected]
with:
PATTERNS: |
proto/**
**/**.pb.go
**/client/**.go
scripts/ci/**
Makefile
Dockerfile
.github/workflows/check-generated.yml
-
name: 🐿 Setup Golang
uses: actions/setup-go@v4
with:
go-version: '^1.20'
ref: ${{ github.event.pull_request.head.ref }}
-
name: "Check protobuf generated code"
run: scripts/ci/check-generated.sh
run: |
make proto-all
make run-querygen
-
name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add *.go
git add *.proto
git commit -m "Generated protofile changes" || echo "No changes to commit"
git push
1 change: 1 addition & 0 deletions proto/osmosis/superfluid/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ service Query {
"unpool_whitelist";
}

// Returns all of a user's full range CL positions that are superfluid staked.
rpc UserConcentratedSuperfluidPositionsDelegated(
UserConcentratedSuperfluidPositionsDelegatedRequest)
returns (UserConcentratedSuperfluidPositionsDelegatedResponse) {
Expand Down
2 changes: 2 additions & 0 deletions x/superfluid/types/query.pb.go

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

0 comments on commit 9c2a991

Please sign in to comment.