@@ -242,9 +242,13 @@ clean:
242
242
$(GO ) clean -i ./...
243
243
rm -rf $(EXECUTABLE ) $(DIST ) $(BINDATA_DEST ) $(BINDATA_HASH ) \
244
244
integrations* .test \
245
+ e2e* .test \
245
246
tests/integration/gitea-integration-pgsql/ tests/integration/gitea-integration-mysql/ tests/integration/gitea-integration-mysql8/ tests/integration/gitea-integration-sqlite/ \
246
247
tests/integration/gitea-integration-mssql/ tests/integration/indexers-mysql/ tests/integration/indexers-mysql8/ tests/integration/indexers-pgsql tests/integration/indexers-sqlite \
247
248
tests/integration/indexers-mssql tests/mysql.ini tests/mysql8.ini tests/pgsql.ini tests/mssql.ini man/
249
+ tests/e2e/gitea-integration-pgsql/ tests/e2e/gitea-integration-mysql/ tests/e2e/gitea-integration-mysql8/ tests/e2e/gitea-integration-sqlite/ \
250
+ tests/e2e/gitea-integration-mssql/ tests/e2e/indexers-mysql/ tests/e2e/indexers-mysql8/ tests/e2e/indexers-pgsql tests/e2e/indexers-sqlite \
251
+ tests/e2e/indexers-mssql
248
252
249
253
.PHONY : fmt
250
254
fmt :
@@ -512,57 +516,61 @@ test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test gen
512
516
513
517
.PHONY : test-e2e%
514
518
# Use only file logging for end-to-end tests
515
- test-e2e% : TEST_LOGGER ?= file TEST_TYPE ?= e2e
519
+ test-e2e% : TEST_LOGGER ?= file
520
+ test-e2e% : TEST_TYPE ?= e2e
516
521
517
522
.PHONY : test-e2e
518
523
test-e2e : test-e2e-sqlite
519
524
520
- .PHONY : test-e2e\# %
521
- test-e2e\#% : test-e2e-sqlite\# %
522
- # Kind of a hack to get makefile to accept passing arguement
523
- true
524
-
525
525
.PHONY : test-e2e-sqlite
526
- test-e2e-sqlite : TAGS+=sqlite sqlite_unlock_notify
527
- test-e2e-sqlite : build generate-ini-sqlite
526
+ test-e2e-sqlite : e2e.sqlite.test generate-ini-sqlite
528
527
npx playwright install $(PLAYWRIGHT_FLAGS )
529
- GITEA_ROOT=$(CURDIR ) GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=tests/sqlite.ini ./tools/ e2e/run_e2e.sh
528
+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test
530
529
531
530
.PHONY : test-e2e-sqlite\# %
532
- test-e2e-sqlite\#% : TAGS+=sqlite sqlite_unlock_notify
533
- test-e2e-sqlite\#% : build generate-ini-sqlite
531
+ test-e2e-sqlite\#% : e2e.sqlite.test generate-ini-sqlite
532
+ npx playwright install $(PLAYWRIGHT_FLAGS )
533
+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/sqlite.ini ./e2e.sqlite.test -test.run $(subst .,/,$* )
534
+
535
+ .PHONY : test-e2e-mysql
536
+ test-e2e-mysql : e2e.mysql.test generate-ini-mysql
537
+ npx playwright install $(PLAYWRIGHT_FLAGS )
538
+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mysql.ini ./e2e.mysql.test
539
+
540
+ .PHONY : test-e2e-mysql\# %
541
+ test-e2e-mysql\#% : e2e.mysql.test generate-ini-mysql
534
542
npx playwright install $(PLAYWRIGHT_FLAGS )
535
- GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/sqlite .ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
543
+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/mysql .ini ./ e2e.mysql.test -test.run $( subst .,/, $* )
536
544
537
545
.PHONY : test-e2e-mysql8
538
- test-e2e-mysql8 : build generate-ini-mysql8
546
+ test-e2e-mysql8 : e2e.mysql8.test generate-ini-mysql8
539
547
npx playwright install $(PLAYWRIGHT_FLAGS )
540
- GITEA_URL= " http://localhost:3004 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mysql8.ini ./tools/ e2e/run_e2e.sh
548
+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/mysql8.ini ./e2e.mysql8.test
541
549
542
550
.PHONY : test-e2e-mysql8\# %
543
- test-e2e-mysql8\#% : build generate-ini-mysql8
551
+ test-e2e-mysql8\#% : e2e.mysql8.test generate-ini-mysql8
544
552
npx playwright install $(PLAYWRIGHT_FLAGS )
545
- GITEA_URL= " http://localhost:3004 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mysql8.ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
553
+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/mysql8.ini ./ e2e.mysql8.test -test.run $( subst .,/, $* )
546
554
547
555
.PHONY : test-e2e-pgsql
548
- test-e2e-pgsql : build generate-ini-pgsql
556
+ test-e2e-pgsql : e2e.pgsql.test generate-ini-pgsql
549
557
npx playwright install $(PLAYWRIGHT_FLAGS )
550
- GITEA_URL= " http://localhost:3002 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/pgsql.ini ./tools/ e2e/run_e2e.sh
558
+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/pgsql.ini ./e2e.pgsql.test
551
559
552
560
.PHONY : test-e2e-pgsql\# %
553
- test-e2e-pgsql\#% : build generate-ini-pgsql
561
+ test-e2e-pgsql\#% : e2e.pgsql.test generate-ini-pgsql
554
562
npx playwright install $(PLAYWRIGHT_FLAGS )
555
- GITEA_URL= " http://localhost:3002 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/pgsql.ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
563
+ GITEA_ROOT= " $( CURDIR ) " GITEA_CONF=tests/pgsql.ini ./ e2e.pgsql.test -test.run $( subst .,/, $* )
556
564
557
565
.PHONY : test-e2e-mssql
558
- test-e2e-mssql : build generate-ini-mssql
566
+ test-e2e-mssql : e2e.mssql.test generate-ini-mssql
559
567
npx playwright install $(PLAYWRIGHT_FLAGS )
560
- GITEA_ROOT=$(CURDIR ) GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mssql.ini ./tools/ e2e/run_e2e.sh
568
+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mssql.ini ./e2e.mssql.test
561
569
562
570
.PHONY : test-e2e-mssql\# %
563
- test-e2e-mssql\#% : build generate-ini-mssql
571
+ test-e2e-mssql\#% : e2e.mssql.test generate-ini-mssql
564
572
npx playwright install $(PLAYWRIGHT_FLAGS )
565
- GITEA_ROOT=$(CURDIR ) GITEA_URL= " http://localhost:3003 " GITEA_EXECUTABLE= $( EXECUTABLE ) GITEA_CONF=$( CURDIR ) / tests/mssql.ini E2E_TESTS= $* ./tools/ e2e/run_e2e.sh
573
+ GITEA_ROOT=" $( CURDIR) " GITEA_CONF=tests/mssql.ini ./ e2e.mssql.test -test.run $( subst .,/, $* )
566
574
567
575
.PHONY : bench-sqlite
568
576
bench-sqlite : integrations.sqlite.test generate-ini-sqlite
@@ -649,6 +657,21 @@ migrations.individual.mssql.test: $(GO_SOURCES)
649
657
migrations.individual.sqlite.test : $(GO_SOURCES )
650
658
$(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags ' $(TEST_TAGS)'
651
659
660
+ e2e.mysql.test : git-check $(GO_SOURCES )
661
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql.test
662
+
663
+ e2e.mysql8.test : git-check $(GO_SOURCES )
664
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mysql8.test
665
+
666
+ e2e.pgsql.test : git-check $(GO_SOURCES )
667
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.pgsql.test
668
+
669
+ e2e.mssql.test : git-check $(GO_SOURCES )
670
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.mssql.test
671
+
672
+ e2e.sqlite.test : git-check $(GO_SOURCES )
673
+ $(GO ) test $(GOTESTFLAGS ) -c code.gitea.io/gitea/tests/e2e -o e2e.sqlite.test -tags ' $(TEST_TAGS)'
674
+
652
675
.PHONY : check
653
676
check : test
654
677
0 commit comments