This repository was archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathappveyor.yml
72 lines (61 loc) · 2.79 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
################################################################################
# This is the template for appveyor.yml which uses the "default model" of the
# test framework in https://github.com/PowerShell/DscResource.Tests.
#
# This template assumes you have connected your repository to AppVeyor
# (https://ci.appveyor.com).
#
# Before using it in your repository, modify places marked with 'TODO:', and
# then remove this comment block.
################################################################################
#---------------------------------#
# environment configuration #
#---------------------------------#
version: 1.0.{build}.0 # TODO: Modify version so it fits your versioning.
environment:
gallery_api:
# TODO: Change to the correct API key if using PowerShell Gallery deploy task.
# If you wish to use this to publish your own module you'd need to set your
# own API key (encrypted by https://ci.appveyor.com/tools/encrypt).
#
# This API key can only be decrypted by the PowerShell Team's AppVeyor account,
# and can only be used for resource modules under the DSC Resource Kit.
secure: 9ekJzfsPCDBkyLrfmov83XbbhZ6E2N3z+B/Io8NbDetbHc6hWS19zsDmy7t0Vvxv
install:
- ps: |
# TODO: Remove these 4 rows.
# This is workaround for AppVeyor replaces '.' with '-' in the folder name.
Set-Location -Path 'C:\projects'
Rename-Item -Path 'C:\projects\dscresource-template' -NewName 'DscResource.Template' -Force
$env:APPVEYOR_BUILD_FOLDER = 'C:\projects\DscResource.Template'
Set-Location -Path $env:APPVEYOR_BUILD_FOLDER
- git clone https://github.com/PowerShell/DscResource.Tests
- ps: Write-Verbose -Message "PowerShell version $($PSVersionTable.PSVersion)" -Verbose
- ps: Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
- ps: Invoke-AppveyorInstallTask
#---------------------------------#
# build configuration #
#---------------------------------#
build: false
#---------------------------------#
# test configuration #
#---------------------------------#
test_script:
- ps: |
# TODO:
# To use -CodeCovIo parameter, the repository need to connected
# to Codecov (see https://codecov.io/).
Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo
# scripts to run before deployment
after_test:
- ps: |
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
Invoke-AppveyorAfterTestTask
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy_script:
- ps: |
# The DscResource.Template has opt-out from any deploy task to PSGallery.
# TODO: Opt-in to deploy tasks.
Invoke-AppVeyorDeployTask -OptIn @()