-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.yaml
96 lines (80 loc) · 2.36 KB
/
build.yaml
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
name: $(BuildDefinitionName)_$(SourceBranchName)_$(Build.Reason)_1.$(Year:yy)$(DayOfYear).$(Hours)$(Minutes)
resources:
repositories:
- repository: self
pool:
vmImage: 'windows-latest'
trigger:
batch : true
branches:
include:
- /*
paths:
exclude:
- README.md
pr:
paths:
exclude:
- README.md
variables:
- name : BuildPlatform
value: 'any cpu'
- name : BuildConfiguration
value: 'release'
- name : Solution
value: '**\*.sln'
stages:
- stage: Build
displayName: Build Stage
jobs:
- job: buildjob
displayName: Build Job
steps:
- checkout: self
submodules: true
- task: NuGetToolInstaller@0
displayName: 'Use Latest NuGet'
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Solution)'
- task: VSBuild@1
displayName: Build Solution
inputs:
solution: $(Solution)
vsVersion: latest
platform: $(BuildPlatform)
configuration: $(BuildConfiguration)
maximumCpuCount: true
- task: PowerShell@2
displayName: Powershell - set WindowsPowerShell directory
inputs:
targetType: 'inline'
script: |
mkdir "$(UserProfile)\Documents\WindowsPowerShell" -ErrorAction SilentlyContinue
- task: Cache@2
inputs:
key: $(Agent.OS)
path: '$(UserProfile)\Documents\WindowsPowerShell'
cacheHitVar: ToolingCached
displayName: Cache Tooling components
- task: PublishPipelineArtifact@1
displayName: Publish Pipeline Artifacts
inputs:
path:
artifact: drop
- job: testjob
displayName: Test Job
dependsOn: buildjob
steps:
- download: current
- task: VSTest@2
displayName: Run Unit Tests
inputs:
testSelector: testAssemblies
testAssemblyVer2: |
**\Plugins*\**\Plugins.Tests.dll
searchFolder: $(Pipeline.Workspace)
codeCoverageEnabled: true
runInParallel: true
runOnlyImpactedTests: true