Skip to content

Commit

Permalink
Corrected module name
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed Feb 10, 2025
1 parent 96f267c commit 54ad532
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/grpc-go-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check generated grpc go files

on: push

jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Install protoc
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler && protoc --version

- name: Check gRPC generated files not manually changed
shell: bash
run: |
make generate-module
CHANGED=$(git diff --name-only ./src/main/proto/**/*.go | wc -l)
if [ "${CHANGED}" -ne "0" ]; then
git diff ./src/main/proto/**/*.go
echo "Committed Protobuf files do not match the newly generated. Please, regenerate Protobuf and commit changes"
exit 1
fi
- name: Check sources
run: make run-test
- name: Build sources
run: make build
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ generate-module: clean-module configure-go
protoc --proto_path=$(PROTO_DIR) \
--go_out=$(MODULE_DIR) \
--go_opt=paths=source_relative \
$(shell find $(PROTO_DIR) -name '*.proto')
go mod init $(MODULE_NAME)
go mod tidy -v
$(shell find $(PROTO_DIR) -name '*.proto')
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module src/main/proto
module github.com/th2-net/th2-grpc-common

go 1.23.0

Expand Down

0 comments on commit 54ad532

Please sign in to comment.