fix mssql ci

This commit is contained in:
Lunny Xiao 2019-01-21 20:40:13 +08:00
parent 3715d5daae
commit 7f1493f27e
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 10 additions and 3 deletions

View File

@ -28,14 +28,21 @@ jobs:
SA_PASSWORD: yourStrong(!)Password SA_PASSWORD: yourStrong(!)Password
MSSQL_PID: Developer MSSQL_PID: Developer
- image: microsoft/mssql-tools
working_directory: /go/src/github.com/go-xorm/xorm working_directory: /go/src/github.com/go-xorm/xorm
steps: steps:
- run:
name: Wait for MSSQL
command: >
c=0;
for i in `seq 30`; do
echo "Waiting for mssql"
sqlcmd -H localhost -U sa -P "yourStrong(!)Password" -Q "CREATE DATABASE xorm_test" > /dev/null > /dev/null && c=0 && break || c=$? && sleep 1
done;
exit $c
- checkout - checkout
- run: go get -t -d -v ./... - run: go get -t -d -v ./...
- run: sqlcmd -S mssql -U sa -P "yourStrong(!)Password" -Q "CREATE DATABASE xorm_test"
- run: go get -u github.com/go-xorm/core - run: go get -u github.com/go-xorm/core
- run: go get -u github.com/go-xorm/builder - run: go get -u github.com/go-xorm/builder
- run: go build -v - run: go build -v