-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
71 lines (61 loc) · 2.25 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
name: 1.1.$(Rev:r)
jobs:
- job:
pool:
vmImage: windows-latest
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
feedsToUse: select
vstsFeed: "xpike-daily"
includeNuGetOrg: true
projects: |
**/*.csproj
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
arguments: --no-restore -c release -p:Version=$(Build.BuildNumber).$(Build.BuildId)
projects: |
src/**/*.csproj
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
publishTestResults: false
arguments: --no-restore -c debug --logger trx -r $(Agent.TempDirectory)/TestResults -p:CollectCoverage=true -p:CoverletOutput="$(Agent.TempDirectory)/TestResults/" -p:CoverletOutputFormat="json%2cCobertura" -p:MergeWith="$(Agent.TempDirectory)/TestResults/coverage.json"
projects: |
test/**/*.csproj
- task: PublishCodeCoverageResults@1
displayName: Publish code coverage results
inputs:
codeCoverageTool: "Cobertura"
summaryFileLocation: "$(Agent.TempDirectory)/TestResults/coverage.cobertura.xml"
- task: PublishTestResults@2
displayName: Publish test results
inputs:
searchFolder: $(Agent.TempDirectory)/TestResults
failTaskOnFailedTests: true
mergeTestResults: true
testResultsFormat: "VSTest"
testResultsFiles: "**/*.trx"
- task: DotNetCoreCLI@2
displayName: Package unstable
inputs:
command: custom
custom: pack
arguments: -c release --no-build -p:PackageVersion=$(Build.BuildNumber)-dev$(Build.BuildId) -o $(Build.ArtifactStagingDirectory)
projects: |
src/**/*.csproj
- task: DotNetCoreCLI@2
displayName: Package stable for Nuget
inputs:
command: custom
custom: pack
arguments: -c release --no-build -p:PackageVersion=$(Build.BuildNumber) -o $(Build.ArtifactStagingDirectory)
projects: |
src/**/*.csproj
- task: PublishBuildArtifacts@1
displayName: Publish Build Artifact