forked from pester/Pester
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
46 lines (43 loc) · 1.38 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
trigger:
- master
pr:
- master
resources:
- repo: self
clean: true
fetchDepth: 1
jobs:
- job: ps2
displayName: PowerShell 2
continueOnError: false
pool:
name: Default
demands:
- ps2
workspace:
clean: all
timeoutInMinutes: 3
steps:
- script: |
rem build in 32-bit version of PowerShell 2 because the 64-bit version
rem was butchered and replaced with PowerShell 6 to be able to run the
rem Azure Pipelines agent on Server 2008 R2 with only PowerShell 2
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe -c "$errorActionPreference = 'stop'; $global:PesterDebugPreference_ShowFullErrors = $true ; try {$PSVersionTable; Set-StrictMode -Version Latest; Import-Module .\Pester.psd1; Invoke-Pester -ExcludeTag VersionChecks, StyleRules, Help -EnableExit} catch { Write-Error $_; exit 9999 }"
exit %errorlevel%
- job: ps3
displayName: PowerShell 3
continueOnError: false
pool:
name: Default
demands:
- ps3
workspace:
clean: all
timeoutInMinutes: 3
steps:
- powershell: |
$global:PesterDebugPreference_ShowFullErrors = $true
$errorActionPreference = 'stop'
Set-StrictMode -Version Latest
Import-Module .\Pester.psd1
Invoke-Pester -ExcludeTag VersionChecks, StyleRules, Help -EnableExit