forked from MaterialDesignInXAML/MaterialDesignInXamlToolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
97 lines (80 loc) · 2.77 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
trigger:
- master
pr:
- master
- release
pool:
vmImage: 'windows-2019'
variables:
solution: 'MaterialDesignToolkit.Full.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
nugetVersionSpec: '5.x.x'
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet $(nugetVersionSpec)'
inputs:
versionSpec: '$(nugetVersionSpec)'
- powershell: .paket\paket.exe restore
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
projects: $(solution)
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '$(solution)'
arguments: '/p:Configuration=$(buildConfiguration) /p:Platform="Any CPU" /p:MDIXVersion=$(mdixVersion).$(Build.BuildID) /p:MDIXColorsVersion=$(mdixColorsVersion).$(Build.BuildID) /p:MDIXMahAppsVersion=$(mdixMahappsVersion).$(Build.BuildID)'
- task: DotNetCoreCLI@2
displayName: 'Unit Tests'
inputs:
command: test
projects: '**/*.Tests.csproj'
arguments: '--configuration $(buildConfiguration) --no-build'
- task: DotNetCoreCLI@2
displayName: 'UI Tests'
inputs:
command: test
projects: '**/*.UITests'
arguments: '--configuration $(buildConfiguration) --no-build'
- task: PublishPipelineArtifact@0
name: "PublishUITestsScreenshots"
inputs:
artifactName: 'Screenshots'
targetPath: 'MaterialDesignThemes.UITests/bin/$(buildConfiguration)/netcoreapp3.1/Screenshots'
condition: always()
- task: PowerShell@2
displayName: "Build NuGets"
inputs:
filePath: 'Scripts\\BuildNugets.ps1'
arguments: '-MDIXVersion $(mdixVersion)-ci$(Build.BuildId) -MDIXMahAppsVersion $(mdixMahappsVersion)-ci$(Build.BuildId) -MDIXColorsVersion $(mdixColorsVersion)-ci$(Build.BuildId)'
- task: PublishPipelineArtifact@0
name: "PublishDemoApp"
inputs:
artifactName: 'DemoApp'
targetPath: 'MainDemo.Wpf/bin/$(buildConfiguration)'
- task: PublishPipelineArtifact@0
name: "PublishMaterialDesign"
inputs:
artifactName: 'MDIX'
targetPath: 'MaterialDesignThemes.$(mdixVersion)-ci$(Build.BuildId).nupkg'
- task: PublishPipelineArtifact@0
name: "PublishMaterialDesignColors"
inputs:
artifactName: 'MDIX.Colors'
targetPath: 'MaterialDesignColors.$(mdixColorsVersion)-ci$(Build.BuildId).nupkg'
- task: PublishPipelineArtifact@0
name: "PublishMaterialDesignMahApps"
inputs:
artifactName: 'MDIX.MahApps'
targetPath: 'MaterialDesignThemes.MahApps.$(mdixMahappsVersion)-ci$(Build.BuildId).nupkg'
- task: PublishPipelineArtifact@0
name: "PublishScript"
inputs:
artifactName: 'Script'
targetPath: 'Scripts\\UpdateNugets.ps1'