@@ -26,7 +26,7 @@ DOCKER_BUILD_ARGS := \
2626BUILD_DMR ?= 1
2727
2828# Main targets
29- .PHONY : build run clean test integration-tests test-docker-ce-installation docker-build docker-build-multiplatform docker-run docker-build-vllm docker-run-vllm docker-build-sglang docker-run-sglang docker-run-impl help validate lint docker-build-diffusers docker-run-diffusers vllm-metal-build vllm-metal-install vllm-metal-dev vllm-metal-clean build-cli install-cli
29+ .PHONY : build run clean test integration-tests test-docker-ce-installation docker-build docker-build-multiplatform docker-run docker-build-vllm docker-run-vllm docker-build-sglang docker-run-sglang docker-run-impl help validate validate-all lint docker-build-diffusers docker-run-diffusers vllm-metal-build vllm-metal-install vllm-metal-dev vllm-metal-clean build-cli install-cli
3030# Default target
3131.DEFAULT_GOAL := build
3232
8989 golangci-lint run ./...
9090 @echo " ✓ Go linting passed!"
9191
92+ # Run all CI validations locally (use before committing)
93+ validate-all :
94+ @echo " ==> Checking go mod tidy..."
95+ @go mod tidy
96+ @git diff --exit-code go.mod go.sum || (echo " ERROR: go.mod/go.sum were not tidy. The files have been updated — please commit the changes." && exit 1)
97+ @echo " ✓ go.mod is tidy"
98+ @echo " "
99+ @echo " ==> Running linter..."
100+ @$(MAKE ) lint
101+ @echo " "
102+ @echo " ==> Running tests with race detection..."
103+ @go test -race ./...
104+ @echo " ✓ All tests passed!"
105+ @echo " "
106+ @echo " ==> Running shellcheck validation..."
107+ @$(MAKE ) validate
108+ @echo " "
109+ @echo " ==> All validations passed! ✅"
110+
92111# Build Docker image
93112docker-build :
94113 docker buildx build $(DOCKER_BUILD_ARGS ) .
@@ -226,12 +245,16 @@ vllm-metal-clean:
226245help :
227246 @echo " Available targets:"
228247 @echo " build - Build the Go application"
248+ @echo " build-cli - Build the CLI (docker-model plugin)"
249+ @echo " install-cli - Build and install the CLI as a Docker plugin"
250+ @echo " docs - Generate CLI documentation"
229251 @echo " run - Run the application locally"
230252 @echo " clean - Clean build artifacts"
231253 @echo " test - Run tests"
232- @echo " integration-tests - Run integration tests"
254+ @echo " integration-tests - Run integration tests (requires Docker) "
233255 @echo " test-docker-ce-installation - Test Docker CE installation with CLI plugin"
234256 @echo " validate - Run shellcheck validation"
257+ @echo " validate-all - Run all CI validations locally (lint, test, shellcheck, go mod tidy)"
235258 @echo " lint - Run Go linting with golangci-lint"
236259 @echo " docker-build - Build Docker image for current platform"
237260 @echo " docker-build-multiplatform - Build Docker image for multiple platforms"
0 commit comments