From 565eb1811c67a8df89a22d65f5e725f88470de6d Mon Sep 17 00:00:00 2001 From: guillep2k <18600385+guillep2k@users.noreply.github.com> Date: Mon, 13 Jan 2020 21:06:54 -0300 Subject: [PATCH] Add test for git + git lfs (#9753) --- Makefile | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index cd1d1fe32095..a163b5c40e97 100644 --- a/Makefile +++ b/Makefile @@ -119,6 +119,13 @@ go-check: exit 1; \ fi +.PHONY: git-check +git-check: + @if git lfs >/dev/null 2>&1 ; then : ; else \ + echo "Gitea requires git with lfs support to run tests." ; \ + exit 1; \ + fi + .PHONY: node-check node-check: $(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | grep -Eo '[0-9]+\.?[0-9]+?\.?[0-9]?' | tr '.' ' ');)) @@ -213,7 +220,7 @@ fmt-check: fi; .PHONY: test -test: +test: git-check GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES) .PHONY: test\#% @@ -352,19 +359,19 @@ bench-pgsql: integrations.pgsql.test generate-ini-pgsql integration-test-coverage: integrations.cover.test generate-ini-mysql GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out -integrations.mysql.test: $(GO_SOURCES) +integrations.mysql.test: git-check $(GO_SOURCES) GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql.test -integrations.mysql8.test: $(GO_SOURCES) +integrations.mysql8.test: git-check $(GO_SOURCES) GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql8.test -integrations.pgsql.test: $(GO_SOURCES) +integrations.pgsql.test: git-check $(GO_SOURCES) GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.pgsql.test -integrations.mssql.test: $(GO_SOURCES) +integrations.mssql.test: git-check $(GO_SOURCES) GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mssql.test -integrations.sqlite.test: $(GO_SOURCES) +integrations.sqlite.test: git-check $(GO_SOURCES) GO111MODULE=on $(GO) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags 'sqlite sqlite_unlock_notify' integrations.cover.test: $(GO_SOURCES)