forked from PowerShell/PowerShellGetv2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
64 lines (51 loc) · 2.05 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
58
59
60
61
62
63
64
version: 1.1.3.{build}
environment:
matrix:
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
PowerShellEdition: Desktop
- APPVEYOR_BUILD_WORKER_IMAGE: WMF 5
PowerShellEdition: Desktop
- APPVEYOR_BUILD_WORKER_IMAGE: WMF 4
PowerShellEdition: Desktop
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
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: |
# Some AppVeyor OS images (ex: VS 2017) are pre-installed with the Azure modules using PowerShellGet cmdlets.
# These pre-installed modules are causing prompts during Update-Module tests as the PSGallery repository is untrusted by design.
# Below command removes the PSGetModuleInfo.xml files created by the Install-Module cmdlet.
Get-Module -ListAvailable | ForEach-Object {Join-Path -Path $_.ModuleBase -ChildPath 'PSGetModuleInfo.xml'} | Where-Object {Test-Path -Path $_ -PathType Leaf} | Remove-Item -Force
Import-Module .\tools\build.psm1
Install-Dependencies
Update-ModuleManifestFunctions
Publish-ModuleArtifacts
Install-PublishedModule
# 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: |
Invoke-PowerShellGetTest
# Upload the project along with TestResults as a zip archive
on_finish:
- ps: |
$zipFile = ".\dist\PowerShellGet.zip"
Push-AppveyorArtifact $zipFile
Get-ChildItem -Path .\Tests\ -Filter 'TestResults*.xml' -File | ForEach-Object {
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "$($_.FullName)")
}