-
Notifications
You must be signed in to change notification settings - Fork 2
/
appveyor.yml
37 lines (30 loc) · 1009 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
32
33
34
35
36
37
# See http://www.appveyor.com/docs/appveyor-yml for many more options
version: 0.22.{build}
only_commits:
files:
- $env:APPVEYOR_PROJECT_NAME/
- $env:APPVEYOR_PROJECT_NAME.nuspec
- Examples/*.ps1
- Tests/*.ps1
- appveyor.yml
image:
- Visual Studio 2015
- WMF 5
- Ubuntu
init:
- ps: |
$PSVersionTable
[System.Environment]::OSVersion
install:
- ps: |
Install-Package -Name Pester -Force -Scope CurrentUser -SkipPublisherCheck -PackageManagementProvider PowerShellGet | Out-Null
Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
build_script:
- ps: |
Import-Module ./$env:APPVEYOR_PROJECT_NAME
test_script:
- ps: |
$res = Invoke-Pester -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
$dest = "https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)"
(New-Object 'System.Net.WebClient').UploadFile($dest, (Resolve-Path TestsResults.xml))
if ($res.FailedCount) { throw "$($res.FailedCount) tests failed." }