-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbuild.yaml
More file actions
89 lines (77 loc) · 2.6 KB
/
build.yaml
File metadata and controls
89 lines (77 loc) · 2.6 KB
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
variables :
- name: 'configuration'
value: 'Release'
- name: 'Parameters.projects'
value: '**/*.csproj'
- name: 'Parameters.projects.tests'
value: '**/*Tests.csproj'
- name: 'majorVersion'
value: '1'
- name: 'minorVersion'
value: '0'
- name: 'patchVersion'
value: '0'
- name : 'projectName'
value: 'DataFilters'
- name: 'azureArtifactFeed'
value: 'Filters'
- name: 'minimumTestsCoverage'
value: 90
- name: 'coverletOutputFormat'
value: 'cobertura%2cjson'
pr:
- master
trigger:
batch: true
branches:
include:
- main
- features/*
- fixes/*
paths:
exclude:
- README.md
- docs/
pool:
vmImage: windows-latest
#Your build pipeline references an undefined variable named ‘Parameters.projects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references a secret variable named ‘github.apiKey’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it secret. See https://go.microsoft.com/fwlink/?linkid=865972
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '$(Parameters.projects)'
feedsToUse: config
nugetConfigPath: Nuget.config
verbosityRestore: Normal
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '$(Parameters.projects)'
arguments: '--no-restore -c $(configuration)'
- task: DotNetCoreCLI@2
displayName: 'Run tests and collect code coverage for DataFilters'
inputs:
command: test
projects: '$(Parameters.projects.tests)'
arguments: >-
--no-build -c $(configuration)
/p:CoverletOutput=$(Agent.TempDirectory)\ /p:CollectCoverage=true
/p:ExcludeByAttribute=Obsolete
/p:MergeWith="$(Agent.TempDirectory)\coverage.json"
/p:CoverletOutputFormat=cobertura
- task: DotNetCoreCLI@2
inputs:
command: custom
custom: tool
arguments: install -g dotnet-reportgenerator-globaltool --ignore-failed-sources
displayName: Install ReportGenerator tool
- script: reportgenerator -reports:$(Agent.TempDirectory)\**\*.cobertura.xml -targetdir:$(Build.SourcesDirectory)\coverlet\reports -reporttypes:"Badges;Cobertura"
displayName: Create reports
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(Build.SourcesDirectory)\coverlet\reports\Cobertura.xml
- task: WhiteSource Bolt@20