-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
35 lines (35 loc) · 1.54 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
name: build-$(Build.BuildId)-date-$(Date:yyyy-MM-dd)
jobs:
- job: PowerShellPesterJob
displayName: PowerShell Pester Test Runner
pool: Hosted VS2017
steps:
- powershell: |
Import-Module Pester
$pesterModule = Get-Module Pester
if ($pesterModule.Version -lt [version]::Parse("4.0")) {
Install-Module -Name Pester -Verbose -Force -SkipPublisherCheck -Scope CurrentUser
Import-Module Pester -Force; }
displayName: 'Install-Module Pester'
- task: richardfennellBM.BM-VSTS-PesterRunner-Task.Pester-Task.Pester@8
displayName: 'Invoke-Pester'
inputs:
scriptFolder: $(Build.SourcesDirectory)/test/*
resultsFile: $(Common.TestResultsDirectory)/TEST-pester-$(Build.BuildNumber).xml
CodeCoverageFolder: $(Build.SourcesDirectory)/src
CodeCoverageOutputFile: $(Common.TestResultsDirectory)/COVERAGE-pester-$(Build.BuildNumber).xml
continueOnError: true
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
searchFolder: $(Common.TestResultsDirectory)
testRunTitle: $(Build.BuildNumber)
testResultsFiles: '**/TEST-*.xml'
testResultsFormat: NUnit
buildPlatform: $(Agent.OS)-$(Agent.OSArchitecture)
buildConfiguration: $(Build.DefinitionName)
- task: PublishCodeCoverageResults@1
displayName: Publish Code Coverage Results
inputs:
codeCoverageTool: JaCoCo
summaryFileLocation: $(Common.TestResultsDirectory)/COVERAGE-pester-$(Build.BuildNumber).xml