From 6ce1007f7354edf2a6ba436a9d8716c3a2942692 Mon Sep 17 00:00:00 2001 From: 0x1d Date: Thu, 6 Nov 2025 22:25:30 +0100 Subject: [PATCH] fix(ci): update CI to generate protobuf and Ent ORM files --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1e0ef6..15cf8bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,23 @@ jobs: - name: Verify dependencies run: go mod verify + - name: Install protoc and plugins + run: | + apt-get update + apt-get install -y protobuf-compiler + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + + - name: Generate protobuf files + run: make generate-proto + + - name: Generate Ent ORM files + run: | + go install entgo.io/ent/cmd/ent@latest + if [ -d "ent" ] && [ -f "ent/generate.go" ]; then + cd ent && go generate ./... + fi + - name: Check for test files id: check-tests run: | @@ -78,6 +95,26 @@ jobs: with: go-version: '1.25.3' + - name: Download dependencies + run: go mod download + + - name: Install protoc and plugins + run: | + apt-get update + apt-get install -y protobuf-compiler + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + + - name: Generate protobuf files + run: make generate-proto + + - name: Generate Ent ORM files + run: | + go install entgo.io/ent/cmd/ent@latest + if [ -d "ent" ] && [ -f "ent/generate.go" ]; then + cd ent && go generate ./... + fi + - name: golangci-lint uses: golangci/golangci-lint-action@v7 with: @@ -107,6 +144,23 @@ jobs: - name: Download dependencies run: go mod download + - name: Install protoc and plugins + run: | + apt-get update + apt-get install -y protobuf-compiler + go install google.golang.org/protobuf/cmd/protoc-gen-go@latest + go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest + + - name: Generate protobuf files + run: make generate-proto + + - name: Generate Ent ORM files + run: | + go install entgo.io/ent/cmd/ent@latest + if [ -d "ent" ] && [ -f "ent/generate.go" ]; then + cd ent && go generate ./... + fi + - name: Build run: | go build -v -o bin/platform ./cmd/platform