mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-21 15:29:53 +00:00
added unit tests for postgres and mysql
This commit is contained in:
7
Makefile
7
Makefile
@@ -12,6 +12,13 @@ test:
|
||||
go vet ./...
|
||||
go test -cover -short ./...
|
||||
|
||||
test_mysql:
|
||||
mysql -P 3306 --protocol=tcp -u root -e 'create database test;'
|
||||
TEST_DRIVER="mysql" TEST_DATASOURCE="root@tcp(127.0.0.1:3306)/test" go test -short github.com/drone/drone/server/datastore/database
|
||||
|
||||
test_postgres:
|
||||
TEST_DRIVER="postgres" TEST_DATASOURCE="host=127.0.0.1 user=postgres dbname=postgres sslmode=disable" go test -short github.com/drone/drone/server/datastore/database
|
||||
|
||||
build:
|
||||
go build -o debian/drone/usr/local/bin/drone -ldflags "-X main.revision $(SHA)" github.com/drone/drone/cli
|
||||
go build -o debian/drone/usr/local/bin/droned -ldflags "-X main.revision $(SHA)" github.com/drone/drone/server
|
||||
|
Reference in New Issue
Block a user