-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpr-pipeline.yml
51 lines (47 loc) · 1.52 KB
/
pr-pipeline.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
pr:
branches:
include:
- master
paths:
include:
- /Intune.HV.Tools
exclude:
- /.gitignore
- /readme.md
- /.tests
stages:
- stage: Build
jobs:
- job: Build
pool:
vmImage: 'vs2017-win2016'
steps:
- task: PowerShell@2
displayName: Pre-Build
inputs:
targetType: 'inline'
script: |
Install-Module -Name Pester -Verbose -Scope CurrentUser -SkipPublisherCheck -Force
Install-Module WindowsAutoPilotIntune -Scope CurrentUser -Force
Install-Module Microsoft.Graph.Intune -Scope CurrentUser -Force
Install-Module Hyper-ConvertImage -Scope CurrentUser -Force
pwsh: true
- task: PowerShell@2
displayName: BuildForTest
inputs:
filePath: './build.ps1'
arguments: '-modulePath $(modulePath) -moduleName $(moduleName)'
pwsh: true
- task: PowerShell@2
displayName: 'Code Quality Test'
inputs:
filePath: './tests/codecheck.ps1'
pwsh: true
- task: PublishTestResults@2
displayName: 'Publish Test Results'
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'pester.codecheck.test.xml'
searchFolder: '$(System.DefaultWorkingDirectory)/.tests'
failTaskOnFailedTests: true
testRunTitle: 'Code Quality Test'