-
Notifications
You must be signed in to change notification settings - Fork 608
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…2074) * Making CI for testing generated proto correctness (#1892) (cherry picked from commit 0956d89) # Conflicts: # chain.schema.json * Fix proto Co-authored-by: Xiangan He <[email protected]> Co-authored-by: Dev Ojha <[email protected]>
- Loading branch information
1 parent
b0afc78
commit 27b8a8e
Showing
45 changed files
with
1,477 additions
and
1,277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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 | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check-proto: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.18' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 # we need a .git directory to run git diff | ||
|
||
- name: "Check protobuf generated code" | ||
run: contrib/scripts/check-generated.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"codebase":{ | ||
"git_repo": "https://github.com/osmosis-labs/osmosis", | ||
"recommended_version": "v10.0.1", | ||
"compatible_versions": ["v10.0.0", "v10.0.1"], | ||
"binaries": { | ||
"linux/amd64": "https://github.com/osmosis-labs/osmosis/releases/download/v10.0.0/osmosis-10.0.0-linux-amd64", | ||
"linux/arm64": "https://github.com/osmosis-labs/osmosis/releases/download/v10.0.0/osmosis-10.0.0-linux-arm64" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
make proto-gen | ||
|
||
#Specificially ignore all differences in go.mod / go.sum. | ||
if ! git diff --stat --exit-code . ':(exclude)*.mod' ':(exclude)*.sum'; then | ||
echo ">> ERROR:" | ||
echo ">>" | ||
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-all' and update this PR." | ||
echo ">>" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.