aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-03-18 01:32:59 +0700
committerShulhan <ms@kilabit.info>2024-03-18 21:55:35 +0700
commite6fed3ef602c587602a7e1eb1de303a0aafdc527 (patch)
treeed32fd9c50d82f63c58600a12b23b9daeb2af3a9 /Makefile
parent0b791515c819b4742c95f98f970e838b3373b0ef (diff)
downloadhaminer-e6fed3ef602c587602a7e1eb1de303a0aafdc527.tar.xz
all: implement forwarder for Postgresql
The Postgresql forwarder accept single option "URL", [forwarder "postgresql"] url = postgres://<user>:<pass>@<host>/<database>?sslmode=<> The user and database must already created first, manually.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index dbf01a4..f840717 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
## SPDX-FileCopyrightText: 2018 M. Shulhan <ms@kilabit.info>
## SPDX-License-Identifier: GPL-3.0-or-later
-.PHONY: all build lint install serve-doc
-all: install
+.PHONY: all build lint serve-doc
+all: build lint test
build:
go build -o ./_bin/ ./cmd/...
-## Run all tests and generate coverage as HTML.
+##---- Run all tests and generate coverage as HTML.
COVER_OUT:=cover.out
COVER_HTML:=cover.html
@@ -18,6 +18,14 @@ test:
-coverprofile=$(COVER_OUT) ./...
go tool cover -html=$(COVER_OUT) -o $(COVER_HTML)
+.PHONY: test-integration
+test-integration:
+ CGO_ENABLED=1 go test -failfast -timeout=1m -race \
+ -coverprofile=$(COVER_OUT) -integration ./...
+ go tool cover -html=$(COVER_OUT) -o $(COVER_HTML)
+
+##----
+
lint:
-fieldalignment ./...
-shadow ./...
@@ -28,13 +36,13 @@ lint:
--disable bodyclose \
./...
-install: build test lint
+install:
go install -v ./cmd/haminer
serve-doc:
ciigo serve _doc
-## Initialize local development by creating image using mkosi.
+##---- Initialize local development by creating image using mkosi.
## NOTE: only works on GNU/Linux OS.
MACHINE_NAME:=haminer-test