mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-21 17:10:26 +01:00
VSTest@2
This commit is contained in:
@@ -12,11 +12,18 @@ steps:
|
||||
echo "BuildId = $(buildId)"
|
||||
displayName: 'Print buildId'
|
||||
|
||||
# Install Tools (SonarScanner)
|
||||
# Install Tools
|
||||
- script: |
|
||||
dotnet tool install --global dotnet-sonarscanner
|
||||
displayName: Install Tools (SonarScanner)
|
||||
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: "Install tool: dotnet-coverageconverter"
|
||||
inputs:
|
||||
command: 'custom'
|
||||
custom: 'tool'
|
||||
arguments: 'update --global dotnet-coverageconverter'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: "Use JDK11 by default"
|
||||
inputs:
|
||||
@@ -57,6 +64,22 @@ steps:
|
||||
arguments: '--configuration Debug --framework netcoreapp3.1 --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover'
|
||||
condition: and(succeeded(), eq(variables['RUN_SONARCLOUD'], 'yes'))
|
||||
|
||||
- task: VSTest@2
|
||||
displayName: 'VsTest'
|
||||
inputs:
|
||||
testSelector: 'testAssemblies'
|
||||
vsTestVersion: 16.0
|
||||
diagnosticsEnabled: true
|
||||
codeCoverageEnabled: true
|
||||
testAssemblyVer2: |
|
||||
**\*tests.dll
|
||||
!**\obj\**
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Convert .coverage to .coveragexml'
|
||||
inputs:
|
||||
script: 'dotnet-coverageconverter --CoverageFilesFolder "$(Agent.TempDirectory)\TestResults"'
|
||||
|
||||
- script: |
|
||||
dotnet test ./test/WireMock.Net.Tests/WireMock.Net.Tests.csproj --configuration Debug --framework netcoreapp3.1 --logger trx /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
|
||||
displayName: 'Build tests and run tests for netcoreapp3.1 (with coverage)'
|
||||
|
||||
Reference in New Issue
Block a user