aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..58fa853
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,18 @@
+
+.PHONY: test
+test: lint ## Run tests with coverage
+ go test -race -short -cover -coverprofile coverage.txt ./...
+ go tool cover -html=coverage.txt -o coverage.html
+
+.PHONY: lint
+lint: ## Run the code linter
+ revive ./...
+
+.PHONY: clean
+clean: ## Clean all test files
+ rm -rf coverage*
+
+.PHONY: help
+help:
+ grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \
+ |awk 'BEGIN{FS=":.*?## "};{printf "\033[36m%-30s\033[0m %s\n",$$1,$$2}'