Skip to content

Commit 682675b

Browse files
committed
Simplify Makefile
1 parent 418867b commit 682675b

File tree

3 files changed

+36
-13
lines changed

3 files changed

+36
-13
lines changed

.drone.yml

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,6 @@ platform:
513513

514514
trigger:
515515
event:
516-
- push
517-
- tag
518516
- pull_request
519517

520518
services:
@@ -526,15 +524,6 @@ services:
526524
POSTGRES_PASSWORD: postgres
527525

528526
steps:
529-
- name: fetch-tags
530-
image: docker:git
531-
commands:
532-
- git fetch --tags --force
533-
when:
534-
event:
535-
exclude:
536-
- pull_request
537-
538527
- name: tag-pre-condition
539528
pull: always
540529
image: drone/git
@@ -550,6 +539,7 @@ steps:
550539
- useradd -m --gid 1001 --uid 1001 gitea
551540
- ./build/test-env-prepare.sh
552541
- su gitea GOPROXY=$GOPROXY GOSUMDB=$GOSUMDB TAGS=$TAGS NO_DEPS_PLAYWRIGHT=$NO_DEPS_PLAYWRIGHT bash -c "export PATH=$PATH:/usr/local/go/bin && timeout -s ABRT 40m make test-e2e-pgsql"
542+
environment:
553543
GOPROXY: https://goproxy.cn
554544
GOSUMDB: sum.golang.org
555545
TAGS: bindata

Makefile

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,13 +506,36 @@ test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test gen
506506
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.individual.mssql.test -test.failfast
507507

508508
.PHONY: test-e2e
509-
test-e2e: test-e2e-pgsql
509+
test-e2e: test-e2e-sqlite
510510

511511
.PHONY: test-e2e\#%
512-
test-e2e\#%: test-e2e-pgsql\#%
512+
test-e2e\#%: test-e2e-sqlite\#%
513+
# Kind of a hack to get makefile to accept passing arguement
513514
true
514515

515516
# Can I share the database with integration tests? Is it cleaned up between tests?
517+
.PHONY: test-e2e-sqlite
518+
test-e2e-sqlite: GOFLAGS+=sqlite sqlite_unlock_notify
519+
test-e2e-sqlite: build generate-ini-sqlite
520+
npx playwright install $(PLAYWRIGHT_FLAGS)
521+
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) ./tools/e2e/run_e2e.sh
522+
523+
.PHONY: test-e2e-sqlite\#%
524+
test-e2e-sqlite\#%: GOFLAGS+=sqlite sqlite_unlock_notify
525+
test-e2e-sqlite\#%: build generate-ini-sqlite
526+
npx playwright install $(PLAYWRIGHT_FLAGS)
527+
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) E2E_TESTS=$* ./tools/e2e/run_e2e.sh
528+
529+
.PHONY: test-e2e-mysql8
530+
test-e2e-mysql8: build generate-ini-mysql8
531+
npx playwright install $(PLAYWRIGHT_FLAGS)
532+
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) ./tools/e2e/run_e2e.sh
533+
534+
.PHONY: test-e2e-mysql8\#%
535+
test-e2e-mysql8\#%: build generate-ini-mysql8
536+
npx playwright install $(PLAYWRIGHT_FLAGS)
537+
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) E2E_TESTS=$* ./tools/e2e/run_e2e.sh
538+
516539
.PHONY: test-e2e-pgsql
517540
test-e2e-pgsql: build generate-ini-pgsql
518541
npx playwright install $(PLAYWRIGHT_FLAGS)
@@ -523,6 +546,16 @@ test-e2e-pgsql\#%: build generate-ini-pgsql
523546
npx playwright install $(PLAYWRIGHT_FLAGS)
524547
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) E2E_TESTS=$* ./tools/e2e/run_e2e.sh
525548

549+
.PHONY: test-e2e-mssql
550+
test-e2e-mssql: build generate-ini-mssql
551+
npx playwright install $(PLAYWRIGHT_FLAGS)
552+
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) ./tools/e2e/run_e2e.sh
553+
554+
.PHONY: test-e2e-mssql\#%
555+
test-e2e-mssql\#%: build generate-ini-mssql
556+
npx playwright install $(PLAYWRIGHT_FLAGS)
557+
GITEA_ROOT=$(CURDIR) GITEA_EXECUTABLE=$(EXECUTABLE) E2E_TESTS=$* ./tools/e2e/run_e2e.sh
558+
526559
.PHONY: bench-sqlite
527560
bench-sqlite: integrations.sqlite.test generate-ini-sqlite
528561
GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.cpuprofile=cpu.out -test.run DontRunTests -test.bench .

tools/e2e/run_e2e.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)