-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (36 loc) · 1.06 KB
/
Makefile
File metadata and controls
43 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
ROOT_DIR = $(shell pwd)
GREEN := "\\033[0;32m"
NC := "\\033[0m"
define print
echo $(GREEN)$1$(NC)
endef
.PHONY: test
test:
@$(call print, "Running all unit tests...")
@go test ./...
.PHONY: test-verbose
test-verbose:
@$(call print, "Running all unit tests with verbose output...")
@go test ./... -v
.PHONY: test-cover
test-cover:
@$(call print, "Running unit tests with coverage...")
@go test ./... -cover
.PHONY: test-cover-html
test-cover-html:
@$(call print, "Running unit tests with coverage and generating HTML report...")
@go test ./... -coverprofile=coverage.out
@go tool cover -html=coverage.out -o coverage.html
@$(call print, "Coverage report generated: coverage.html")
.PHONY: test-race
test-race:
@$(call print, "Running unit tests with race detector...")
@go test ./... -race
.PHONY: test-short
test-short:
@$(call print, "Running short unit tests...")
@go test ./... -short
.PHONY: list-versions
list-versions:
@$(call print, "Listing all available versions of github.com/steemit/steemutil...")
@go list -m -versions github.com/steemit/steemutil