@@ -119,6 +119,13 @@ go-check:
119119 exit 1; \
120120 fi
121121
122+ .PHONY : git-check
123+ git-check :
124+ @if git lfs > /dev/null 2>&1 ; then : ; else \
125+ echo " Gitea requires git with lfs support to run tests." ; \
126+ exit 1; \
127+ fi
128+
122129.PHONY : node-check
123130node-check :
124131 $(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:
213220 fi ;
214221
215222.PHONY : test
216- test :
223+ test : git-check
217224 GO111MODULE=on $(GO ) test -mod=vendor -tags=' sqlite sqlite_unlock_notify' $(PACKAGES )
218225
219226.PHONY : test\# %
@@ -352,19 +359,19 @@ bench-pgsql: integrations.pgsql.test generate-ini-pgsql
352359integration-test-coverage : integrations.cover.test generate-ini-mysql
353360 GITEA_ROOT=${CURDIR} GITEA_CONF=integrations/mysql.ini ./integrations.cover.test -test.coverprofile=integration.coverage.out
354361
355- integrations.mysql.test : $(GO_SOURCES )
362+ integrations.mysql.test : git-check $(GO_SOURCES )
356363 GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql.test
357364
358- integrations.mysql8.test : $(GO_SOURCES )
365+ integrations.mysql8.test : git-check $(GO_SOURCES )
359366 GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mysql8.test
360367
361- integrations.pgsql.test : $(GO_SOURCES )
368+ integrations.pgsql.test : git-check $(GO_SOURCES )
362369 GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.pgsql.test
363370
364- integrations.mssql.test : $(GO_SOURCES )
371+ integrations.mssql.test : git-check $(GO_SOURCES )
365372 GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.mssql.test
366373
367- integrations.sqlite.test : $(GO_SOURCES )
374+ integrations.sqlite.test : git-check $(GO_SOURCES )
368375 GO111MODULE=on $(GO ) test -mod=vendor -c code.gitea.io/gitea/integrations -o integrations.sqlite.test -tags ' sqlite sqlite_unlock_notify'
369376
370377integrations.cover.test : $(GO_SOURCES )
0 commit comments