File tree Expand file tree Collapse file tree 3 files changed +17
-8
lines changed
Expand file tree Collapse file tree 3 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 4646 go-version-file : " go.mod"
4747 cache : true
4848
49+ - name : Install dependencies
50+ run : go mod download
51+
4952 - name : Check code formatting
5053 run : make format-ci
5154
7174 go-version-file : " go.mod"
7275 cache : true
7376
77+ - name : Install dependencies
78+ run : go mod download
79+
7480 - name : Build for ${{ matrix.os }}/${{ matrix.arch }}
7581 run : |
7682 GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build-ci
Original file line number Diff line number Diff line change @@ -128,8 +128,8 @@ build: ## Build the agent
128128
129129.PHONY : test-ci
130130test-ci : # # Run tests in CI
131- go test -coverprofile=coverage.out ./...
132- go tool cover -func=coverage.out
131+ GOFLAGS= " " go test -coverprofile=coverage.out ./...
132+ GOFLAGS= " " go tool cover -func=coverage.out
133133
134134.PHONY : format-ci
135135format-ci : install-gofumpt install-goimports-reviser # # Check code formatting in CI
@@ -150,8 +150,10 @@ format-ci: install-gofumpt install-goimports-reviser ## Check code formatting in
150150 @echo " All files are properly formatted!"
151151
152152.PHONY : lint-ci
153- lint-ci : lint # # Run linters in CI (same as lint)
153+ lint-ci : install-golangci-lint # # Run linters in CI
154+ GOFLAGS=" " $(GOLANGCI_LINT ) run
154155
155156.PHONY : build-ci
156- build-ci : build # # Build the MCP server in CI
157+ build-ci : # # Build the MCP server in CI
158+ GOFLAGS=" " CGO_ENABLED=0 GOOS=$(GOOS ) GOARCH=$(GOARCH ) go build -o dist/server cmd/server/main.go
157159
Original file line number Diff line number Diff line change @@ -65,13 +65,14 @@ strategy:
6565
6666**Integration with Makefile:**
6767
68- - `make test-ci` : Runs tests with coverage output
68+ - `make test-ci` : Runs tests with coverage output (overrides vendor mode)
6969- `make format-ci` : Checks formatting without modifying files
70- - `make lint-ci` : Runs linters (delegates to `make lint` )
71- - `make build-ci` : Cross-platform build validation
70+ - `make lint-ci` : Runs linters (overrides vendor mode )
71+ - `make build-ci` : Cross-platform build validation (overrides vendor mode)
7272
7373**Environment Variables:**
7474
7575- `GOOS` and `GOARCH` : Set by matrix for cross-compilation
76- - `GOFLAGS="-mod=vendor"` : Automatically set via Makefile export
76+ - `GOFLAGS=""` : CI targets override vendor mode to leverage Go module cache
77+ - Local development still uses `GOFLAGS="-mod=vendor"` for offline builds
7778
You can’t perform that action at this time.
0 commit comments