Files
sqltoolsservice/azure-pipelines/integrationtests.yml
Aasim Khan 9877af54b9 Updating to dotnet 5.0 (#1218)
* adding network file validator contract

* updating to dotnet 5

* reverting change in pipeline

* updating target framework to 5.0

* updating srgen and using target framework var

* reverting srgen back to 3.1

* Adding dotnet 3.1 to build

* Fixing task def

* removing global json

* updating other 3.1 refs to 5.0

* removing netcore folder from build.cake

* Moving and renaming dotnet 3.1 task
2021-06-25 13:53:01 -07:00

57 lines
1.7 KiB
YAML

pool:
name: SqlToolsTestAgentPool
demands: VisualStudio_16.0
steps:
- task: DownloadSecureFile@1
displayName: 'Download secure file'
inputs:
secureFile: 'testsettings.json'
- task: VisualStudioTestPlatformInstaller@1
displayName: 'Visual Studio Test Platform Installer'
inputs:
versionSelector: latestStable
- task: UseDotNet@2
displayName: 'Use .NET Core sdk '
inputs:
useGlobalJson: true
- task: NuGetAuthenticate@0
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '**/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj'
arguments: '/p:CodeCoverageBuild=true'
- task: CopyFiles@2
displayName: 'Copy testsettings file to bin'
inputs:
SourceFolder: '$(Agent.TempDirectory)'
Contents: '**\testsettings.json'
TargetFolder: '$(Build.SourcesDirectory)\test\Microsoft.SqlTools.ServiceLayer.IntegrationTests\bin\Debug\net5.0'
- task: DotNetCoreCLI@2
displayName: 'Run integration tests'
inputs:
command: test
projects: '**/Microsoft.SqlTools.ServiceLayer.IntegrationTests.csproj'
arguments: '--no-build'
testRunTitle: 'SqlToolsService Integration Tests'
enabled: false
- task: VSTest@2
displayName: 'Run integration tests with code coverage'
inputs:
testAssemblyVer2: '**/bin/Debug/**/Microsoft.SqlTools.ServiceLayer.IntegrationTests.dll'
vsTestVersion: toolsInstaller
runSettingsFile: 'azure-pipelines/testrun.runsettings'
codeCoverageEnabled: true
testRunTitle: 'SqlToolsService Integration Tests'
rerunFailedTests: true
rerunFailedThreshold: 15
rerunMaxAttempts: 1
continueOnError: true