-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
100 lines (85 loc) · 2.43 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: $(Date:yyyy-MM-dd)$(Rev:_r)
pool:
vmImage: windows-latest
pr:
branches:
include:
- develop
- feature/*
trigger:
branches:
include:
- main
- develop
steps:
- task: UseDotNet@2
displayName: use netcoreapp3.1 sdk
inputs:
version: '3.1.x'
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: use net5.0 sdk
inputs:
version: '5.0.x'
performMultiLevelLookup: true
- task: UseDotNet@2
displayName: use net6.0 sdk
inputs:
version: '6.0.x'
- task: DotNetCoreCLI@2
displayName: restore dependencies
inputs:
command: restore
projects: src/**/*.csproj
feedsToUse: select
vstsFeed: "4053202a-1650-47d7-804a-73158b8e55f7"
- task: DotNetCoreCLI@2
displayName: build projects
inputs:
projects: src/**/*.csproj
arguments: --no-restore
- task: DotNetCoreCLI@2
displayName: test netcoreapp3.1
inputs:
command: test
projects: src/**/test/**/BizStream.*.Tests.csproj
arguments: -f netcoreapp3.1 --collect:"XPlat Code coverage" --no-build
testRunTitle: netcoreapp3.1
- task: DotNetCoreCLI@2
displayName: test net5.0
inputs:
command: test
projects: src/**/test/**/BizStream.*.Tests.csproj
arguments: -f net5.0 --collect:"XPlat Code coverage" --no-build
testRunTitle: net5.0
- task: DotNetCoreCLI@2
displayName: test net6.0
inputs:
command: test
projects: src/**/test/**/BizStream.*.Tests.csproj
arguments: -f net6.0 --collect:"XPlat Code coverage" --no-build
testRunTitle: net6.0
- task: reportgenerator@4
displayName: generate code coverage
inputs:
reports: $(Agent.TempDirectory)/**/coverage.cobertura.xml
targetdir: $(Agent.TempDirectory)/CoverageResults
- task: PublishCodeCoverageResults@1
displayName: publish code coverage
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Agent.TempDirectory)/CoverageResults/Cobertura.xml
failIfCoverageEmpty: true
- task: DotNetCoreCLI@2
displayName: create packages
inputs:
command: pack
packagesToPack: src/**/*.csproj;!src/**/*.Tests.csproj
nobuild: true
includesymbols: false
- task: PublishBuildArtifacts@1
displayName: publish artifact
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: mvc-component-assets
condition: succeededOrFailed()