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:
authorJaime Martinez <jmartinez@gitlab.com>2022-06-15 07:10:16 +0300
committerJaime Martinez <jmartinez@gitlab.com>2022-06-15 07:10:16 +0300
commitf0f709a80eb0cd1b27a0d998ee1fbd6b087cbfee (patch)
treed1858489e0af16066a60df315dd79678e6d825cc /Makefile.util.mk
parent912bcfae2e50f62e400dc3ac6feb4c59838e53cb (diff)
parent4707b9da8e78cdc83841b2771c6bb8a0ea876f47 (diff)
Merge branch 'ci/unit-test-avoid-compile' into 'master'
ci: add unit-test task and avoid building the binary See merge request gitlab-org/gitlab-pages!782
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 5a196fe4..7287d260 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}