-
Notifications
You must be signed in to change notification settings - Fork 18
/
appveyor.yml
48 lines (41 loc) · 1.53 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
version: 1.1.{build}
image: Visual Studio 2019
clone_folder: c:\src\github.com\runner-mei\GoBatis
environment:
SRCROOT: c:\src\github.com\runner-mei\GoBatis
GOPATH: c:\
SQLINSTANCE: SQL2017
HOST: localhost
SQLUSER: sa
SQLPASSWORD: Password12!
DATABASE: test
services:
- mssql2017
before_test:
- dir c:\
- go version
- go env
- go get golang.org/x/tools/cmd/goimports
- go install golang.org/x/tools/cmd/goimports
# setup SQL Server
- ps: |
$instanceName = $env:SQLINSTANCE
Start-Service "MSSQL`$$instanceName"
Start-Service "SQLBrowser"
- sqlcmd -S "(local)\%SQLINSTANCE%" -Q "Use [master]; CREATE DATABASE test COLLATE Chinese_PRC_CI_AS"
test_script:
- set PATH=c:\go\bin;%PATH%;%GOPATH%\bin
- cd c:\src\github.com\runner-mei\GoBatis\cmd\gobatis
- go install
- cd ../..
- go install
- go generate ./...
- del gentest\fail\interface.gobatis.go
- go test -v -dbDrv=mssql "-dbURL=sqlserver://%SQLUSER%:%SQLPASSWORD%@%HOST%/%SQLINSTANCE%?database=%DATABASE%&connection+timeout=30" ./...
- cd %SRCROOT%\core
- go test -v -dbDrv=mssql "-dbURL=sqlserver://%SQLUSER%:%SQLPASSWORD%@%HOST%/%SQLINSTANCE%?database=%DATABASE%&connection+timeout=30"
- cd %SRCROOT%\example
- go test -v -dbDrv=mssql "-dbURL=sqlserver://%SQLUSER%:%SQLPASSWORD%@%HOST%/%SQLINSTANCE%?database=%DATABASE%&connection+timeout=30"
- cd %SRCROOT%\example_xml
- go test -v -dbDrv=mssql "-dbURL=sqlserver://%SQLUSER%:%SQLPASSWORD%@%HOST%/%SQLINSTANCE%?database=%DATABASE%&connection+timeout=30"
build: off