forked from dahlbyk/posh-git
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
36 lines (32 loc) · 1.16 KB
/
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
os:
- "WMF 5"
branches:
only:
- master
install:
- ps: |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | Out-Null
Install-Module Pester -MinimumVersion 3.4.0 -Scope CurrentUser -Force | Out-Null
"PSVersion: $($PSVersionTable.PSVersion), build: $($PSVersionTable.BuildVersion), clr version: $($PSVersionTable.ClrVersion)"
"Host name: $($Host.Name)"
build: false
test_script:
- ps: |
$testResultsFile = Join-Path $Env:APPVEYOR_BUILD_FOLDER TestResults.xml
$pesterParams = @{
Script = "$Env:APPVEYOR_BUILD_FOLDER\test"
OutputFile = $testResultsFile
OutputFormat = "NUnitXml"
PassThru = $true
Verbose = $VerbosePreference
}
Import-Module Pester
$res = Invoke-Pester @pesterParams
if (Test-Path $testResultsFile) {
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $testResultsFile)
}
if ($res.FailedCount -gt 0) {
# Terminate the script to fail the build
$Error | Format-List * -Force
exit 1;
}