-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathazure-pipelines.yml
75 lines (66 loc) · 2.11 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
# Universal Windows Platform
# Build a Universal Windows Platform project using Visual Studio.
# Add steps that test and distribute an app, save build artifacts, and more:
# https://aka.ms/yaml
trigger:
branches:
include:
- feature/*
- fix/*
pool:
vmImage: 'windows-latest'
variables:
group: BuildPipelineVariables
solution: '**/FolderIconPainter.sln'
testProject: '**/*.UnitTests.csproj'
buildPlatform: 'x64'
buildConfiguration: 'Release'
appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'
buildFolder: '$(Build.SourcesDirectory)\bin\'
jobs:
- job: Build
displayName: 'Build & Run Tests'
timeoutInMinutes: 10
steps:
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
displayName: Restore NuGet Packages for Folder Icon Painter
inputs:
command: 'restore'
restoreSolution: '$(solution)'
- task: VSBuild@1
displayName: 'Build Folder Icon Painter Package'
inputs:
platform: '$(buildPlatform)'
solution: '$(solution)'
configuration: '$(buildConfiguration)'
msbuildArgs: '/p:AppxBundlePlatforms="$(buildPlatform)"
/p:AppxPackageDir="$(appxPackageDir)"
/p:AppxPackageSigningEnabled=false
/p:AppxBundle=Always
/p:UapAppxPackageBuildMode=StoreUpload'
# Builds unit tests
- task: MSBuild@1
displayName: 'Build Unit Tests'
inputs:
solution: '$(testProject)'
configuration: 'Debug'
msbuildArguments: '/t:build /restore'
maximumCpuCount: true
- task: VSTest@2
displayName: 'Run Unit Tests'
inputs:
platform: '$(BuildPlatform)'
configuration: 'Debug'
testAssemblyVer2: '$(System.DefaultWorkingDirectory)\**\**\bin\Debug\**\*UnitTests.dll'
minimumExpectedTests: 1
failOnMinTestsNotRun: true
codeCoverageEnabled: true
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: VSTest
testResultsFiles: '**\*.trx'
searchFolder: '$(Agent.TempDirectory)'
failTaskOnFailedTests: true
testRunTitle: 'Unit tests'