本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.1KB

  1. version: 1.0.{build}
  2. os: Windows Server 2012 R2
  3. clone_folder: c:\gopath\src\github.com\denisenkom\go-mssqldb
  4. environment:
  5. GOPATH: c:\gopath
  6. HOST: localhost
  7. SQLUSER: sa
  8. SQLPASSWORD: Password12!
  9. DATABASE: test
  10. GOVERSION: 111
  11. matrix:
  12. - GOVERSION: 18
  13. SQLINSTANCE: SQL2016
  14. - GOVERSION: 19
  15. SQLINSTANCE: SQL2016
  16. - GOVERSION: 110
  17. SQLINSTANCE: SQL2016
  18. - GOVERSION: 111
  19. SQLINSTANCE: SQL2016
  20. - SQLINSTANCE: SQL2014
  21. - SQLINSTANCE: SQL2012SP1
  22. - SQLINSTANCE: SQL2008R2SP2
  23. install:
  24. - set GOROOT=c:\go%GOVERSION%
  25. - set PATH=%GOPATH%\bin;%GOROOT%\bin;%PATH%
  26. - go version
  27. - go env
  28. - go get -u github.com/golang-sql/civil
  29. build_script:
  30. - go build
  31. before_test:
  32. # setup SQL Server
  33. - ps: |
  34. $instanceName = $env:SQLINSTANCE
  35. Start-Service "MSSQL`$$instanceName"
  36. Start-Service "SQLBrowser"
  37. - sqlcmd -S "(local)\%SQLINSTANCE%" -Q "Use [master]; CREATE DATABASE test;"
  38. - sqlcmd -S "(local)\%SQLINSTANCE%" -h -1 -Q "set nocount on; Select @@version"
  39. - pip install codecov
  40. test_script:
  41. - go test -race -cpu 4 -coverprofile=coverage.txt -covermode=atomic
  42. - codecov -f coverage.txt
上海开阖软件有限公司 沪ICP备12045867号-1