-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathazure-pipelines.yml
59 lines (47 loc) · 1.64 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
# Build pipeline for Azure DevOps
# https://aka.ms/yaml
# trigger CI builds off of master commits
trigger:
- master
jobs:
# The Windows 2019 and Windows 2016 builds
- job: ModernWindows
# run the build against different versions of Windows to test backwards compatability
strategy:
matrix:
win2019:
imageName: "windows-2019"
win2016:
imageName: "vs2017-win2016"
maxParallel: 1
pool:
vmImage: $(imageName)
steps:
# Run the Pester Unit Test framework
- powershell: '$(Build.SourcesDirectory)\\Tests\\Invoke-PesterAzureDevOps.ps1'
displayName: 'Run Pester Unit Test Framework'
# Publish the Pester test results
- task: PublishTestResults@2
displayName: "Publish Test Results"
inputs:
testRunTitle: 'Test Results for Pester'
buildPlatform: 'Windows'
testRunner: 'NUnit'
testResultsFiles: '$(Build.SourcesDirectory)\\Tests\\TEST-RESULTS.xml'
failTaskOnFailedTests: true # required to fail build when tests fail
# The legacy Windows 2012 R2 Build
# Having trouble getting Pester installed on the Win 2012 R2 image, so I
# created a manual PowerShell unit test
- job: LegacyWindows
pool:
vmImage: 'vs2015-win2012r2'
steps:
# Run the VisualsBulkDownloadTool.ps1 script to make sure there are no errors
- task: PowerShell@2
inputs:
filePath: '$(Build.SourcesDirectory)\\Misc\\VisualsBulkDownloadTool.ps1'
arguments: '-CertifiedOnly -MicrosoftOnly'
# Test to make sure that there is at least one pbiviz file that was downloaded
- task: PowerShell@2
inputs:
filePath: '$(Build.SourcesDirectory)\\Tests\\LegacyWin2012R2Tests.ps1'