run cockroach backround

This commit is contained in:
Lunny Xiao 2018-04-17 10:54:44 +08:00
parent ffe1622039
commit d303e6f022
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ test:
- go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -schema=xorm -coverprofile=coverage5-1.txt -covermode=atomic
- go test -v -race -db="postgres" -conn_str="dbname=xorm_test sslmode=disable" -schema=xorm -cache=true -coverprofile=coverage5-2.txt -covermode=atomic
- wget -qO- https://binaries.cockroachdb.com/cockroach-v2.0.0.linux-amd64.tgz | tar xvz
- ./cockroach-v2.0.0.linux-amd64/cockroach start --insecure --host=localhost &
- ./cockroach-v2.0.0.linux-amd64/cockroach start --insecure --host=localhost
background: true
- sleep 5
- ./cockroach-v2.0.0.linux-amd64/cockroach sql --insecure --execute="create database xorm_test"
- go test -v -race -db="postgres" -conn_str="postgresql://root@localhost:26257/xorm_test?sslmode=disable" -coverprofile=coverage6-1.txt -covermode=atomic
- gocovmerge coverage1-1.txt coverage1-2.txt coverage2-1.txt coverage2-2.txt coverage3-1.txt coverage3-2.txt coverage4-1.txt coverage4-2.txt coverage5-1.txt coverage5-2.txt coverage6-1.txt> coverage.txt