fix(ci): update to use Makefile commands
This commit is contained in:
49
.github/workflows/ci.yml
vendored
49
.github/workflows/ci.yml
vendored
@@ -40,13 +40,11 @@ jobs:
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Generate protobuf files
|
||||
run: make generate-proto
|
||||
|
||||
- name: Generate Ent ORM files
|
||||
- name: Generate code
|
||||
run: |
|
||||
go install entgo.io/ent/cmd/ent@latest
|
||||
make generate-proto
|
||||
if [ -d "ent" ] && [ -f "ent/generate.go" ]; then
|
||||
go install entgo.io/ent/cmd/ent@latest
|
||||
cd ent && go generate ./...
|
||||
fi
|
||||
|
||||
@@ -68,7 +66,7 @@ jobs:
|
||||
if: steps.check-tests.outputs.tests_exist == 'true'
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
run: go test -v -race -coverprofile=coverage.out -timeout=5m ./...
|
||||
run: make test-coverage
|
||||
|
||||
- name: Upload coverage
|
||||
if: steps.check-tests.outputs.tests_exist == 'true'
|
||||
@@ -79,9 +77,7 @@ jobs:
|
||||
|
||||
- name: Verify build (no tests)
|
||||
if: steps.check-tests.outputs.tests_exist == 'false'
|
||||
run: |
|
||||
echo "No tests found. Verifying code compiles instead..."
|
||||
go build ./...
|
||||
run: make build
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
@@ -105,21 +101,21 @@ jobs:
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Generate protobuf files
|
||||
run: make generate-proto
|
||||
|
||||
- name: Generate Ent ORM files
|
||||
- name: Generate code
|
||||
run: |
|
||||
go install entgo.io/ent/cmd/ent@latest
|
||||
make generate-proto
|
||||
if [ -d "ent" ] && [ -f "ent/generate.go" ]; then
|
||||
go install entgo.io/ent/cmd/ent@latest
|
||||
cd ent && go generate ./...
|
||||
fi
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v7
|
||||
with:
|
||||
version: latest
|
||||
args: --timeout=5m
|
||||
- name: Install golangci-lint
|
||||
run: |
|
||||
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run linters
|
||||
run: make lint
|
||||
|
||||
build:
|
||||
name: Build
|
||||
@@ -151,13 +147,11 @@ jobs:
|
||||
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
|
||||
echo "$HOME/go/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Generate protobuf files
|
||||
run: make generate-proto
|
||||
|
||||
- name: Generate Ent ORM files
|
||||
- name: Generate code
|
||||
run: |
|
||||
go install entgo.io/ent/cmd/ent@latest
|
||||
make generate-proto
|
||||
if [ -d "ent" ] && [ -f "ent/generate.go" ]; then
|
||||
go install entgo.io/ent/cmd/ent@latest
|
||||
cd ent && go generate ./...
|
||||
fi
|
||||
|
||||
@@ -190,9 +184,4 @@ jobs:
|
||||
go-version: '1.25.3'
|
||||
|
||||
- name: Check formatting
|
||||
run: |
|
||||
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
|
||||
echo "The following files need formatting:"
|
||||
gofmt -s -d .
|
||||
exit 1
|
||||
fi
|
||||
run: make fmt-check
|
||||
|
||||
Reference in New Issue
Block a user