chore: makefile, http server command

This commit is contained in:
IliaDenisov
2026-02-12 15:05:51 +03:00
parent e8c3411a50
commit ce3d9c5d48
3 changed files with 40 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
.DEFAULT_GOAL := build
fmt:
@go fmt ./...
.PHONY:fmt
vet: fmt
@go vet ./...
.PHONY:vet
test:
@mkdir -p artifacts/test
@go clean -testcache
# first, run tests with stdout
@go test -cover ./...
# second, run cached tests with reports output
@go test ./... -coverprofile artifacts/test/coverage.out -json > artifacts/test/coverage.json
@go tool cover -html artifacts/test/coverage.out -o artifacts/test/coverage.html
build: vet test
@go build -o artifacts/bin/server cmd/http/main.go
.PHONY:build