Add test target in Makefile

This commit is contained in:
Jan Eitzinger 2024-03-22 09:00:48 +01:00
parent dc1ee0f17c
commit 61892666a7

View File

@ -29,20 +29,21 @@ install: $(APP)
@install -Dpm 755 $(APP) $${WORKSPACE}/usr/$(BINDIR)/$(APP)
@install -Dpm 600 config.json $${WORKSPACE}/etc/$(APP)/$(APP).json
.PHONY: clean
.PHONY: clean test fmt
.ONESHELL:
clean:
rm -f $(APP)
.PHONY: fmt
test:
$(info ===> TESTING)
@go clean -testcache
@go build ./...
@go vet ./...
@go test ./...
fmt:
go fmt $(GOSRC_APP)
# Examine Go source code and reports suspicious constructs
.PHONY: vet
vet:
go vet ./...
# Run linter for the Go programming language.
# Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules
.PHONY: staticcheck