forked from cloudbase/windows-imaging-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
20 lines (16 loc) · 1.01 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
version: 1.0.{build}
branches:
only:
- master
build: false
install:
- cinst pester
- git submodule update --init --recursive
test_script:
- ps: Install-Module -Name PSScriptAnalyzer
- ps: $rules = @("PSProvideCommentHelp","PSUseDeclaredVarsMoreThanAssignments","PSAvoidUsingEmptyCatchBlock","PSAvoidUsingCmdletAliases","PSAvoidDefaultValueForMandatoryParameter","PSAvoidDefaultValueSwitchParameter","PSUseToExportFieldsInManifest","PSAvoidUsingPositionalParameters")
- ps: $resScryptAnalyzer = Invoke-ScriptAnalyzer -Path . -IncludeRule $rules
- ps: echo $resScryptAnalyzer
- ps: $res = Invoke-Pester -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
- ps: if (($res.FailedCount -gt 0) -or ($resScryptAnalyzer.Count -gt 0)) { throw "$($res.FailedCount) Pester tests failed. $($resScryptAnalyzer.Count) failed style warnings found."}