-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathappveyor.yml
More file actions
25 lines (22 loc) · 931 Bytes
/
appveyor.yml
File metadata and controls
25 lines (22 loc) · 931 Bytes
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
version: 1.0.{build}
image: Visual Studio 2017
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
}