diff --git a/.github/workflows/check-generate.yml b/.github/workflows/check-go-generate.yml similarity index 76% rename from .github/workflows/check-generate.yml rename to .github/workflows/check-go-generate.yml index 56d7254..bf86aab 100644 --- a/.github/workflows/check-generate.yml +++ b/.github/workflows/check-go-generate.yml @@ -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/protoc-gen-go@v1.34.1 @@ -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 diff --git a/.github/workflows/check-rs-generate b/.github/workflows/check-rs-generate new file mode 100644 index 0000000..6f2f8eb --- /dev/null +++ b/.github/workflows/check-rs-generate @@ -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/rust-toolchain@1.82.0 + + - 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 \ No newline at end of file