-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2b3ea9
commit b3b1c55
Showing
2 changed files
with
40 additions
and
7 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Check make generate | ||
name: Check go generate | ||
on: | ||
push: | ||
branches: | ||
|
@@ -10,7 +10,7 @@ permissions: | |
|
||
jobs: | ||
check-go-generate: | ||
name: Check make generate | ||
name: Check make generate-go | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -20,9 +20,6 @@ jobs: | |
with: | ||
go-version: '1.21' # Specify the Go version you're using | ||
|
||
- name: Set up Rust | ||
uses: dsherret/rust-toolchain-file@v1 | ||
|
||
- name: Install protoc-gen-go and protoc-gen-go-grpc | ||
run: | | ||
go install google.golang.org/protobuf/cmd/[email protected] | ||
|
@@ -41,10 +38,10 @@ jobs: | |
- name: Run make generate | ||
run: make generate | ||
|
||
- name: Check if make generate generated changes that should be committed | ||
- name: Check if make generate-go generated changes that should be committed | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Error: make generate generated changes that should be committed. Please run 'make generate' and commit the changes." | ||
echo "Error: make generate-go generated changes that should be committed. Please run 'make generate-go' and commit the changes." | ||
git diff | ||
git status | ||
exit 1 | ||
|
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,36 @@ | ||
name: Check rust generate | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check-go-generate: | ||
name: Check make generate-rs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Rust | ||
uses: dtolnay/[email protected] | ||
|
||
- name: Install Protoc | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y protobuf-compiler | ||
|
||
- name: Run make generate-rs | ||
run: make generate-rs | ||
|
||
- name: Check if make generate-rs generated changes that should be committed | ||
run: | | ||
if [ -n "$(git status --porcelain)" ]; then | ||
echo "Error: make generate-rs generated changes that should be committed. Please run 'make generate-rs' and commit the changes." | ||
git diff | ||
git status | ||
exit 1 | ||
fi |