Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-11 19:43:15 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2022-06-11 19:43:25 +0300
commit4707b9da8e78cdc83841b2771c6bb8a0ea876f47 (patch)
treee6f0c4b1decbffaac8b7225a35adc52058bf91ad /Makefile.util.mk
parent413d38fbd39fc3870ee5668ce69ee50d952deb73 (diff)
Add unit-test task and avoid building the binary
Diffstat (limited to 'Makefile.util.mk')
-rw-r--r--Makefile.util.mk6
1 files changed, 4 insertions, 2 deletions
diff --git a/Makefile.util.mk b/Makefile.util.mk
index a2eea8bf..ce84d578 100644
--- a/Makefile.util.mk
+++ b/Makefile.util.mk
@@ -1,4 +1,4 @@
-.PHONY: lint format test race acceptance bench cover deps-check mocks-check deps-download changelog zip
+.PHONY: lint format test unit-test race acceptance bench cover deps-check mocks-check deps-download changelog zip
OUT_FORMAT ?= colored-line-number
LINT_FLAGS ?= $(if $V,-v)
@@ -14,9 +14,11 @@ format:
$Q go run github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_VERSION) run ./... --fix --out-format $(OUT_FORMAT) $(LINT_FLAGS) | tee ${REPORT_FILE}
test: gitlab-pages
- rm -f tests.out
go run gotest.tools/gotestsum@$(GOTESTSUM_VERSION) --junitfile junit-test-report.xml --format testname -- ./... ${ARGS}
+unit-test:
+ go run gotest.tools/gotestsum@$(GOTESTSUM_VERSION) --junitfile junit-test-report.xml --format testname -- -short ./... ${ARGS}
+
race: gitlab-pages
go run gotest.tools/gotestsum@$(GOTESTSUM_VERSION) --junitfile junit-test-report.xml --format testname -- -race $(if $V,-v) ./... ${ARGS}