forked from Phil-Factor/PSYaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
26 lines (20 loc) · 1017 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
# See http://www.appveyor.com/docs/appveyor-yml for many more options
# Skip on updates to the readme.
# We can force this by adding [skip ci] or [ci skip] anywhere in commit message
skip_commits:
message: /updated readme.*/
install:
# Install Package Provider to install PsScriptAnalyzer
- ps: Install-Module Pester -Force
# Install PsScriptAnalyzer to ensure we are following powershell best practices
- ps: Install-Module PsScriptAnalyzer -Force
# We aren't building any artifacts
build: false
# The magic for testing goes here!
test_script:
# Invoke pester, but output each test as UnitXML
- ps: $res = Invoke-Pester -Path ".\Tests" -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
# Upload the xml to appveyor
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
# If any failed, fail the build
- ps: if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}