-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI check that auto-generated code is up to date (#1828)
- Loading branch information
1 parent
eea64af
commit b5da142
Showing
4 changed files
with
52 additions
and
5 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,38 @@ | ||
name: Auto-Generated Code Checker | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- master | ||
- dev | ||
pull_request: | ||
|
||
jobs: | ||
protobuf_codegen: | ||
name: Protobuf | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.19.12' | ||
check-latest: true | ||
- uses: bufbuild/buf-setup-action@v1.23.1 | ||
- shell: bash | ||
run: scripts/protobuf_codegen.sh | ||
- shell: bash | ||
run: .github/workflows/check-clean-branch.sh | ||
mock_gen: | ||
name: Mocks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '~1.19.12' | ||
check-latest: true | ||
- shell: bash | ||
run: scripts/mock.gen.sh | ||
- shell: bash | ||
run: .github/workflows/check-clean-branch.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,9 @@ | ||
#!/bin/bash | ||
# Exits if any uncommitted changes are found. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
git update-index --really-refresh >> /dev/null | ||
git diff-index --quiet HEAD |
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
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