forked from PowerShell/PowerShellGetv2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
57 lines (47 loc) · 1.61 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
os:
- "WMF 5"
environment:
matrix:
- PowerShellEdition: Desktop
- PowerShellEdition: Core
configuration: Release
platform: Any CPU
# clone directory
clone_folder: c:\projects\powershellget
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# Install Pester and PackageManagement modules
install:
- ps: |
Import-Module .\tools\build.psm1
Install-Dependencies
# to run your custom scripts instead of automatic MSBuild
#build_script:
# to disable automatic builds
build: off
# branches to build
branches:
# whitelist
only:
- master
- development
# Run Pester tests and store the results
test_script:
- ps: |
Import-Module .\tools\build.psm1
Invoke-PowerShellGetTest
$TestResultFilePath = Resolve-Path .\Tests\TestResults.xml
if(Microsoft.PowerShell.Management\Test-Path -Path $TestResultFilePath -PathType Leaf) {
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", $TestResultFilePath)
}
# Upload the project along with TestResults as a zip archive
on_finish:
- ps: |
$stagingDirectory = (Resolve-Path ..).Path
$zipFile = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
Add-Type -assemblyname System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory($pwd, $zipFile)
@(
# You can add other artifacts here
(ls $zipFile)
) | % { Push-AppveyorArtifact $_.FullName }