forked from dsccommunity/ComputerManagementDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
77 lines (61 loc) · 3.27 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
65
66
67
68
69
70
71
72
73
74
75
76
77
# HOW TO DEBUG: See start of each build run's output how to connect with RDP to the build server for debugging.
# See section on_finish last in this file on how to pause build and to keep RDP open.
# Look for each "DEBUG:" comment below how to change
version: 1.0.{build}
# Do not build on full releases.
skip_tags: true
# See https://www.appveyor.com/docs/windows-images-software
# DEBUG: for debug purpose, comment and un-comment images as needed.
image:
- Visual Studio 2019 # Windows Server 2019
#- Visual Studio 2017 # Windows Server 2016
#- Visual Studio 2013 # Windows Server 2012 R2
environment:
Dummy: AnyValue
# DEBUG: Un-comment this to get the same password for the RDP session for each build
#APPVEYOR_RDP_PASSWORD: D5c1234!
# DEBUG: If running on own AppVeyor project, comment the if-block below to run on all branches.
init:
- ps: |
# Only run for pull requests
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { Write-Host -ForegroundColor 'Yellow' -Object 'Not a pull request, skipping.'; return }
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
# DEBUG: If running on own AppVeyor project, comment the if-block below to run on all branches.
install:
- ps: |
# Only run for pull requests
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { Write-Host -ForegroundColor 'Yellow' -Object 'Not a pull request, skipping.'; return }
winrm quickconfig -quiet
# DEBUG: If running on own AppVeyor project, comment the if-block below to run on all branches.
build_script:
- pwsh: |
# Only run for pull requests
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { Write-Host -ForegroundColor 'Yellow' -Object 'Not a pull request, skipping.'; return }
# Set module version using GitVersion
dotnet tool install --global GitVersion.Tool
$env:IGNORE_NORMALISATION_GIT_HEAD_MOVE = 1
dotnet-gitversion
$gitVersionObject = dotnet-gitversion | ConvertFrom-Json
$gitVersionObject
$env:ModuleVersion = $gitVersionObject.NuGetVersionV2
# Build the module
./build.ps1 -ResolveDependency -tasks build
# DEBUG: If running on own AppVeyor project, comment the if-block below to run on all branches.
test_script:
- ps: |
# Only run for pull requests
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { Write-Host -ForegroundColor 'Yellow' -Object 'Not a pull request, skipping.'; return }
./build.ps1 -Tasks test -PesterScript 'tests/Integration' -CodeCoverageThreshold 0
deploy: off
# DEBUG: Un-comment the line "$blockRdp = $true" so that build worker is kept up all of the 60 minutes.
# DEBUG: If running on own AppVeyor project, comment the if-block below to run on all branches.
on_finish:
- ps: |
# Only run for pull requests
if (-not $env:APPVEYOR_PULL_REQUEST_NUMBER) { Write-Host -ForegroundColor 'Yellow' -Object 'Not a pull request, skipping.'; return }
<#
These two lines can also be added in one or more places somewhere in the integration tests to pause the test run. Continue
running the tests by deleting the file on the desktop that was created by "enable-rdp.ps1" when $blockRdp is $true.
#>
#$blockRdp = $true
iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))