update makefile

This commit is contained in:
Mike Mason
2023-07-17 19:47:21 +00:00
parent 8b93a128e4
commit df0cc4aa58

View File

@@ -11,7 +11,7 @@ GOTOOLS_VERSION = v0.9.3
GOLANGCI_LINT_REPO = github.com/golangci/golangci-lint GOLANGCI_LINT_REPO = github.com/golangci/golangci-lint
GOLANGCI_LINT_VERSION = v1.51.2 GOLANGCI_LINT_VERSION = v1.51.2
.PHONY: all help lint test golint fix-lint unit-test coverage privkey .PHONY: all help lint test golint fix-lint unit-test coverage
help: Makefile ## Print help. help: Makefile ## Print help.
@@ -35,13 +35,16 @@ unit-test: ## Runs unit tests.
@echo Running unit tests... @echo Running unit tests...
@go test -timeout 30s -cover -short ./... @go test -timeout 30s -cover -short ./...
.PHONY: coverage
coverage: ## Generates a test coverage report. coverage: ## Generates a test coverage report.
@echo Generating coverage report... @echo Generating coverage report...
@go test -timeout 30s ./... -coverprofile=coverage.out -covermode=atomic @go test -timeout 30s ./... -coverprofile=coverage.out -covermode=atomic
@go tool cover -func=coverage.out @go tool cover -func=coverage.out
@go tool cover -html=coverage.out @go tool cover -html=coverage.out
bin: ## Builds the binary
@echo Building binary
@go build -o infra9-metal-bridge ./main.go
# Tools setup # Tools setup
$(TOOLS_DIR): $(TOOLS_DIR):
mkdir -p $(TOOLS_DIR) mkdir -p $(TOOLS_DIR)