Skip to content

Commit 26c29c4

Browse files
committed
add unit test with mysql
1 parent 39b32b8 commit 26c29c4

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.drone.yml

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ steps:
120120
image: golang:1.13
121121
commands:
122122
- make test
123+
- make unit-test-mysql
123124
environment:
124125
GOPROXY: off
125126
TAGS: bindata sqlite sqlite_unlock_notify

Makefile

+8
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,14 @@ fmt-check:
168168
test:
169169
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
170170

171+
.PHONY: unit-test-sqlite
172+
unit-test-sqlite:
173+
GO111MODULE=on $(GO) test -mod=vendor -tags='sqlite sqlite_unlock_notify' $(PACKAGES)
174+
175+
.PHONY: unit-test-mysql
176+
unit-test-mysql:
177+
GO111MODULE=on GITEA_UNIT_TESTS_DB=mysql GITEA_UNIT_TESTS_DB_CONNSTR="$(TEST_MYSQL_USERNAME):$(TEST_MYSQL_PASSWORD)@tcp($(TEST_MYSQL_HOST))/$(TEST_PGSQL_DBNAME)" $(GO) test -mod=vendor $(PACKAGES)
178+
171179
.PHONY: coverage
172180
coverage:
173181
@hash gocovmerge > /dev/null 2>&1; if [ $$? -ne 0 ]; then \

0 commit comments

Comments
 (0)