Skip to content

Commit

Permalink
ci: Fix generated code check on main (#173)
Browse files Browse the repository at this point in the history
* make proto-gen on main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Show git diffs when generated code check fails

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Remove unnecessary buf installation step

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Remove unnecessary protoc-gen-gogofaster install command

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Add Buf API token for linting of private repos

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* debug: Try check which version of protoc-gen-gogofaster is installed

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert "debug: Try check which version of protoc-gen-gogofaster is installed"

This reverts commit 0204310.

* debug: Display Go and Buf versions on failure

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Revert "debug: Display Go and Buf versions on failure"

This reverts commit 86dc450.

* ci: Remove tools/path config from proto check

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Add tokens to appease Buf in proto linting workflow

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Fix buf API token param name

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* debug: Attempt to use Go 1.19 in CI

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
  • Loading branch information
thanethomson committed Jan 21, 2023
1 parent 0b36d31 commit 84d76c2
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ jobs:
echo ">> Generated mocks require update (either Mockery or source files may have changed)."
echo ">> Ensure your tools are up-to-date, re-run 'make mockery' and update this PR."
echo ">>"
git diff
exit 1
fi
Expand All @@ -48,7 +49,7 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.18"
go-version: "1.19"

- uses: actions/checkout@v3
with:
Expand All @@ -58,15 +59,6 @@ jobs:
run: |
set -euo pipefail
# Install buf and gogo tools, so that differences that arise from
# toolchain differences are also caught.
readonly tools="$(mktemp -d)"
export PATH="${PATH}:${tools}/bin"
export GOBIN="${tools}/bin"
go install github.com/bufbuild/buf/cmd/buf
go install github.com/cosmos/gogoproto/protoc-gen-gogofaster@latest
make proto-gen
if ! git diff --stat --exit-code ; then
Expand All @@ -75,5 +67,6 @@ jobs:
echo ">> Protobuf generated code requires update (either tools or .proto files may have changed)."
echo ">> Ensure your tools are up-to-date, re-run 'make proto-gen' and update this PR."
echo ">>"
git diff
exit 1
fi
4 changes: 4 additions & 0 deletions .github/workflows/proto-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: bufbuild/buf-setup-action@v1.12.0
with:
github_token: ${{ secrets.BUF_GITHUB_API_TOKEN }}
buf_api_token: ${{ secrets.BUF_API_TOKEN }}
- uses: bufbuild/buf-lint-action@v1
with:
input: 'proto'
buf_token: ${{ secrets.BUF_API_TOKEN }}
1 change: 1 addition & 0 deletions abci/types/types.pb.go

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

1 change: 1 addition & 0 deletions proto/tendermint/crypto/keys.pb.go

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

1 change: 1 addition & 0 deletions proto/tendermint/mempool/types.pb.go

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

1 change: 1 addition & 0 deletions proto/tendermint/p2p/conn.pb.go

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

1 change: 1 addition & 0 deletions proto/tendermint/statesync/types.pb.go

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

0 comments on commit 84d76c2

Please sign in to comment.