-
Notifications
You must be signed in to change notification settings - Fork 22
/
azure-pipelines.yml
66 lines (55 loc) · 1.6 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
trigger:
- master
- develop
pr:
- master
- develop
variables:
BuildConfiguration: Release
BuildPlatform: Any CPU
jobs:
- job: Build
pool:
vmImage: vs2017-win2016
steps:
- checkout: self
clean: true
lfs: true
- task: VisualStudioTestPlatformInstaller@1
displayName: Install VSTest
- task: NuGetCommand@2
displayName: Restore packages
- powershell: |
$ErrorActionPreference = 'Stop'
$VerbosePreference = 'Continue'
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module -Name platyPS -Repository PSGallery -SkipPublisherCheck -Force
New-ExternalHelp -Path "${env:BUILD_SOURCESDIRECTORY}\docs" -OutputPath "${env:BUILD_SOURCESDIRECTORY}\src\PowerShell\bin\${env:BuildConfiguration}" -Force
displayName: Compile documentation
- task: VSBuild@1
displayName: Build solution
inputs:
configuration: $(BuildConfiguration)
maximumCpuCount: true
platform: $(BuildPlatform)
env:
RunCodeAnalysis: true
TreatWarningsAsErrors: true
- task: VSTest@2
displayName: Test solution
inputs:
codeCoverageEnabled: true
configuration: $(BuildConfiguration)
platform: $(BuildPlatform)
runInParallel: true
- task: CopyFiles@2
displayName: Copy files
inputs:
SourceFolder: $(System.DefaultWorkingDirectory)
Contents: |
src\**\bin\$(BuildConfiguration)\**
TargetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: Publish artifact
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)