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 49 50
|
parameters:
- name: Pdb2PdbExe
type: string
default: ''
steps:
- task: UseDotNet@2
displayName: "Install DotNet SDK"
inputs:
packageType: 'sdk'
workingDirectory: 'cs'
performMultiLevelLookup: true
useGlobalJson: true
- task: NuGetAuthenticate@1
displayName: 'NuGet Authenticate'
- task: DotNetCoreCLI@2
displayName: "DotNet Restore"
inputs:
command: 'restore'
workingDirectory: 'cs'
projects: 'cs/TunnelsSDK.sln'
nugetConfigPath: 'cs/NuGet.config'
verbosityRestore: 'Minimal'
feedsToUse: 'config'
- task: DotNetCoreCLI@2
displayName: "DotNet Build"
inputs:
command: 'build'
workingDirectory: 'cs'
projects: 'cs/TunnelsSDK.sln'
arguments: '-v:n --no-restore -c Release -p:EnableSigning="$(enableSigning)" -p:SignType="$(signType)" -p:Pdb2PdbExe="${{ parameters.Pdb2PdbExe }}"'
- task: DotNetCoreCLI@2
displayName: "DotNet Test"
inputs:
command: 'test'
workingDirectory: 'cs'
projects: 'cs/TunnelsSDK.sln'
publishTestResults: true
arguments: '-v:n -c release -p:CodeCoverage=true --no-build'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: cs/bin/release/testresults/coverage/TunnelsSDK/Cobertura.xml
failIfCoverageEmpty: true
|