forked from MathieuBuisson/Powershell-Utility
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
31 lines (25 loc) · 982 Bytes
/
appveyor.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
version: 1.0.{build}
os: WMF 5
# Skip on updates to the readme
skip_commits:
message: /readme*/
install:
- ps: Install-PackageProvider -Name NuGet -Force
- ps: Install-Module PsScriptAnalyzer -Force
build: false
test_script:
- ps: |
Add-AppveyorTest -Name "PsScriptAnalyzer" -Outcome Running
$Results = Invoke-ScriptAnalyzer -Path $pwd -Recurse -Severity Error -ErrorAction SilentlyContinue
If ($Results) {
$ResultString = $Results | Out-String
Write-Warning $ResultString
Add-AppveyorMessage -Message "PSScriptAnalyzer output contained one or more result(s) with 'Error' severity.`
Check the 'Tests' tab of this build for more details." -Category Error
Update-AppveyorTest -Name "PsScriptAnalyzer" -Outcome Failed -ErrorMessage $ResultString
# Failing the build
Throw "Build failed"
}
Else {
Update-AppveyorTest -Name "PsScriptAnalyzer" -Outcome Passed
}