fix mssql test

This commit is contained in:
Lunny Xiao 2018-10-22 13:25:05 +08:00
parent 2b464a1d7b
commit 56bb4a5855
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
1 changed files with 5 additions and 8 deletions

View File

@ -53,16 +53,13 @@ pipeline:
- | - |
psql -U postgres -d xorm_test -h pgsql \ psql -U postgres -d xorm_test -h pgsql \
-c "create schema xorm;" -c "create schema xorm;"
init_mssql: init_mssql:
image: microsoft/mssql-server-linux:2017-CU11 image: microsoft/mssql-tools
commands: commands:
- echo 'SELECT 1;' > ./select.sql - sqlcmd -S mssql -U sa -P "yourStrong(!)Password" -Q "CREATE DATABASE xorm_test"
- echo 'CREATE DATABASE xorm_test' > ./create.sql when:
- | event: [ push, tag, pull_request ]
until /opt/mssql-tools/bin/sqlcmd -S mssql -U sa \
-i ./select.sql >/dev/null 2>&1; do sleep 1; done
- /opt/mssql-tools/bin/sqlcmd -S mssql -U sa -P "yourStrong(!)Password" -i ./create.sql
build: build:
image: golang:${GO_VERSION} image: golang:${GO_VERSION}