forked from PowerShellOrg/Plaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
35 lines (31 loc) · 1.29 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
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
Install-Module psake -Scope CurrentUser -Force | Out-Null
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force | Out-Null
Install-Module platyPS -Scope CurrentUser -Force | Out-Null
build_script:
- ps: |
$testResultsFile = Join-Path $pwd -ChildPath "$PSScriptRoot/TestResults.xml"
Invoke-psake build.psake.ps1 -taskList Test, BuildHelp -properties @{"TestOutputFile" = $testResultsFile}
if ($psake.build_success -and (Test-Path $testResultsFile)) {
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $testResultsFile)
}
else {
# Terminate the script to fail the build
$Error | Format-List * -Force
exit 1;
}
on_finish:
- ps: |
# Publish the contents of the Release folder
Add-Type -assemblyname System.IO.Compression.FileSystem
$zipPath = "$pwd\Plaster.zip"
[System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\Release", $zipPath)
Push-AppveyorArtifact $zipPath