-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
51 lines (49 loc) · 1.76 KB
/
azure-pipelines.yml
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
51
name: MGR.AsyncContract.SourceGenerator - $(Date:yyyyMMdd)$(rev:.r)
variables:
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: 1
- name: System.Configuration
value: Release
stages:
- stage: Build
displayName: 'Build the library'
jobs:
- job: BuildLibrary
displayName: Build the library
pool:
name: Azure Pipelines
vmImage: windows-2019
steps:
- task: UseDotNet@2
displayName: 'Install the .NET Core SDK (5.0.x)'
inputs:
packageType: 'sdk'
version: '5.0.x'
- task: UseDotNet@2
displayName: 'Install the .NET Core SDK (3.1.x)'
inputs:
packageType: 'sdk'
version: '3.1.x'
- task: DotNetCoreCLI@2
displayName: 'Build & Pack the libraries'
inputs:
arguments: '-c $(System.Configuration)'
- task: DotNetCoreCLI@2
displayName: 'Test the libraries'
inputs:
command: test
projects: 'tests/**Tests/*.csproj'
arguments: '-c $(System.Configuration) --no-build --collect:"XPlat Code Coverage" --settings build/coverlet.runsettings'
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@4
displayName: 'Generate code coverage report'
inputs:
reports: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
targetdir: '$(Build.ArtifactStagingDirectory)/Coverage'
condition: succeededOrFailed()
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from $(Build.ArtifactStagingDirectory)/Coverage/Cobertura.xml'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(Build.ArtifactStagingDirectory)/Coverage/Cobertura.xml'
reportDirectory: '$(Build.ArtifactStagingDirectory)/Coverage'
condition: succeededOrFailed()