-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
48 lines (40 loc) · 1.2 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
trigger:
- main
pool:
name: default
variables:
buildConfiguration: 'Release'
steps:
- task: UseDotNet@2
inputs:
version: '7.0.x'
- task: DotNetCoreCLI@2
displayName: 'Build project'
inputs:
command: 'build'
configuration: $(buildConfiguration)
- task: DotNetCoreCLI@2
displayName: 'Starting test execution'
inputs:
command: 'test'
arguments: '--configuration $(buildConfiguration) --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura'
publishTestResults: true
projects: '**/*Tests/*.csproj'
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage report'
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: '$(Agent.TempDirectory)/**/coverage.cobertura.xml'
# Publish projects to specified folder.
- task: DotNetCoreCLI@2
displayName: 'Project publish'
inputs:
command: publish
publishWebProjects: true
arguments: '-o $(Build.ArtifactStagingDirectory)/Output'
zipAfterPublish: true
modifyOutputPath: true
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'initial-project'