diff --git a/.github/workflows/go-tests.yml b/.github/workflows/go-tests.yml index b9a748cdd3c..142a3df4e09 100644 --- a/.github/workflows/go-tests.yml +++ b/.github/workflows/go-tests.yml @@ -131,10 +131,10 @@ jobs: - name: Run "make generate" and check for changes run: | set -e - apt install protobuf-compiler + sudo apt -qq -y -o=Dpkg::Use-Pty=0 install protobuf-compiler go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.2 go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.5.1 - make generate 2>/dev/null + go generate ./... if [[ $(git status --porcelain) ]]; then echo "Error: Uncommitted changes found after running 'make generate'. Please commit all generated code." git diff diff --git a/Makefile b/Makefile index 36d1b506f1f..bbfa4bbee94 100644 --- a/Makefile +++ b/Makefile @@ -263,13 +263,6 @@ cscli: ## Build cscli crowdsec: ## Build crowdsec @$(MAKE) -C $(CROWDSEC_FOLDER) build $(MAKE_FLAGS) -.PHONY: generate -generate: ## Generate code for the database and APIs - $(GO) generate ./pkg/database/ent - $(GO) generate ./pkg/models - $(GO) generate ./pkg/modelscapi - $(GO) generate ./pkg/protobufs - .PHONY: testclean testclean: bats-clean ## Remove test artifacts @$(RM) pkg/apiserver/ent $(WIN_IGNORE_ERR)