This repository was archived by the owner on May 15, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathappveyor.yml
More file actions
92 lines (76 loc) · 2.78 KB
/
appveyor.yml
File metadata and controls
92 lines (76 loc) · 2.78 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.0.{build}
# Do not build on tags (GitHub only)
skip_tags: false
#---------------------------------#
# environment configuration #
#---------------------------------#
# Operating system (build VM template)
os: Windows Server 2012 R2
#---------------------------------#
# build configuration #
#---------------------------------#
install:
ps: |
cinst PowerShellGet -Source https://www.myget.org/F/dsc-hero/
$PowerShellGetPath = (join-path $env:programfiles 'windowspowershell/modules/PowerShellGet')
if (-not (test-path $PowerShellGetPath))
{
mkdir $PowerShellGetPath
}
copy-item "$env:programdata\chocolatey\lib\PowerShellGet.0.5\*"-Destination $PowerShellGetPath -recurse -force
#
cinst OneGet -Source https://www.myget.org/F/dsc-hero/
$OneGetPath = (join-path $env:programfiles 'windowspowershell/modules/OneGet')
if (-not (test-path $OneGetPath))
{
mkdir $OneGetPath
}
copy-item "$env:programdata\chocolatey\lib\OneGet.1.0.0.0\*" -Destination $OneGetPath -recurse -force
#
install-module pester
# to run your custom scripts instead of automatic MSBuild
#build_script:
# - ps:
# to disable automatic builds
build: off
#---------------------------------#
# tests configuration #
#---------------------------------#
# to run your custom scripts instead of automatic tests
test_script:
ps: |
if (test-path ./test/unit) {
Invoke-Pester -path ./test/unit -EnableExit
}
else {
Write-Host "No tests found under $(join-path $pwd '/test/unit')"
}
# to disable automatic tests
#test: off
#---------------------------------#
# deployment configuration #
#---------------------------------#
# to run your custom scripts instead of provider deployments
deploy_script:
ps: |
$ModulePath = join-path $env:programfiles "windowspowershell/modules/$env:APPVEYOR_PROJECT_NAME"
if (-not (test-path $ModulePath)) { mkdir $ModulePath }
copy-item . -Destination $ModulePath -recurse -exclude .git, *.md, appveyor.yml
#
# Publish Module
if ([bool]::parse($env:APPVEYOR_REPO_TAG))
{
register-psrepository -Name MyGet -SourceLocation https://www.myget.org/F/dsc-hero/ -Publish https://www.myget.org/F/dsc-hero/
publish-module -Name StackExchangeResources -NuGetApiKey 3d1bf1d1-3ad1-48d5-9058-adc0a180ab3e -repository MyGet
}
# to disable deployment
#deploy: off