-
Notifications
You must be signed in to change notification settings - Fork 5
/
azure-pipelines.yml
65 lines (52 loc) · 1.61 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
name: $(Year:yy)$(DayOfYear)$(Rev:r)
trigger:
branches:
include:
- master
paths:
exclude:
- readme.md
pool:
vmImage: ubuntu-latest
variables:
azureNuGet: https://pkgs.dev.azure.com/saucecontrol/InheritDoc/_packaging/inheritdoc_ci/nuget/v3/index.json
disable.coverage.autogenerate: true
steps:
- checkout: self
fetchDepth: 1
fetchTags: false
- task: UseDotNet@2
displayName: Ensure 8.0 SDK
inputs:
version: 8.0.x
includePreviewVersions: true
- task: UseDotNet@2
displayName: Ensure 6.0 Runtime
inputs:
packageType: runtime
version: 6.0.x
performMultiLevelLookup: true
- script: dotnet build src/InheritDoc -c Dist -p:GeneratePackageOnBuild=false
displayName: Build
- script: dotnet build src/InheritDoc -c Dist --version-suffix ci$(Build.BuildNumber)
displayName: Pack
- script: dotnet test tests/InheritDoc.Test -c Coverage
displayName: Test
- task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@5
displayName: Coverage Reports
inputs:
reports: out/coverage/opencover*.xml
targetdir: out/coverage/reports
reporttypes: HtmlInline_AzurePipelines;Cobertura
- task: NuGetAuthenticate@1
condition: ne(variables['Build.Reason'], 'PullRequest')
- script: dotnet nuget push --source $(azureNuGet) --api-key AzureArtifacts out/nuget/*.nupkg
displayName: Push
condition: ne(variables['Build.Reason'], 'PullRequest')
- task: PublishTestResults@2
inputs:
testRunner: VSTest
testResultsFiles: out/testresults/*.trx
- task: PublishCodeCoverageResults@2
inputs:
summaryFileLocation: out/coverage/reports/Cobertura.xml