37 lines
1.5 KiB
YAML
37 lines
1.5 KiB
YAML
version: 1.0.{build}
|
|
image: Visual Studio 2019
|
|
|
|
services:
|
|
- mssql2017
|
|
- msmq
|
|
|
|
hosts:
|
|
SpringQA: 127.0.0.1
|
|
|
|
build_script:
|
|
- rem set the alias for SpringQA so that integration test conn strings resolve properly...
|
|
- 'powershell "%APPVEYOR_BUILD_FOLDER%\build-support\appveyor-set-sql-alias-for-springqa.ps1" '
|
|
- rem create the database and schemas to support the integration tests...
|
|
- call "%APPVEYOR_BUILD_FOLDER%\build-support\appveyor-database-integration-tests-setup-scripts.cmd"
|
|
- rem we need the MSDTC running for the Tx integration tests to pass so start it if necessary...
|
|
- powershell "%APPVEYOR_BUILD_FOLDER%\build-support\wait-to-restart-service.ps1" "'MSDTC'"
|
|
- rem after applying the alias, we need to restart the SQL Server instance to ensure the alias is picked up properly...
|
|
- powershell "%APPVEYOR_BUILD_FOLDER%\build-support\wait-to-restart-service.ps1" "'MSSQL$SQL2017'"
|
|
- rem attempt to access the database via its alias to validate alias is functional...
|
|
- sqlcmd -S "SpringQA" -U springqa -P springqa -Q "select * from Vacations"
|
|
- rem actually invoke the build + test run
|
|
- call build-ci.cmd test package-nuget
|
|
|
|
test: off
|
|
|
|
artifacts:
|
|
- path: nuget-packages/*.*nupkg
|
|
name: NuGet
|
|
|
|
on_finish:
|
|
- ps: >-
|
|
$wc = New-Object 'System.Net.WebClient'
|
|
|
|
|
|
Get-ChildItem -Path (Join-Path $($env:APPVEYOR_BUILD_FOLDER) \build\net) -Recurse -File -Filter "*-TestResults.xml" | % { $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $_.FullName) }
|