forked from dsccommunity/ActiveDirectoryDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
81 lines (68 loc) · 2.15 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
78
79
80
81
#---------------------------------#
# environment configuration #
#---------------------------------#
version: 4.0.{build}
environment:
gallery_api:
secure: 9ekJzfsPCDBkyLrfmov83XbbhZ6E2N3z+B/Io8NbDetbHc6hWS19zsDmy7t0Vvxv
DeployInJobNumber: 2
# The configuration that will be used when building the job matrix.
# Meta = Test Framework Common Test
# Tests = Module Unit Tests and Integration Tests.
configuration:
- Meta
- Tests
install:
- git clone https://github.com/PowerShell/DscResource.Tests
- ps: |
Write-Verbose -Message "PowerShell version $($PSVersionTable.PSVersion)" -Verbose
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
Invoke-AppveyorInstallTask
#---------------------------------#
# build configuration #
#---------------------------------#
build: false
#---------------------------------#
# test configuration #
#---------------------------------#
# This will build the job matrix:
#
# Job 1: Run meta test (common tests) on default build worker image.
# Job 2: Run unit tests and integration tests on default build worker image,
# including Codecov report.
for:
-
matrix:
only:
- configuration: Meta
test_script:
- ps: |
Invoke-AppveyorTestScriptTask
-
matrix:
only:
- configuration: Tests
environment:
SkipAllCommonTests: True
test_script:
- ps: |
Invoke-AppveyorTestScriptTask -CodeCoverage -CodeCovIo
# Runs for all jobs.
after_test:
- ps: |
Import-Module -Name "$env:APPVEYOR_BUILD_FOLDER\DscResource.Tests\AppVeyor.psm1"
Invoke-AppveyorAfterTestTask -Type 'Wiki'
#---------------------------------#
# deployment configuration #
#---------------------------------#
# Runs only in a branch (not in PR).
deploy_script:
- ps: |
if ($env:APPVEYOR_JOB_NUMBER -eq $env:DeployInJobNumber)
{
Invoke-AppVeyorDeployTask
}
else
{
Write-Verbose -Message ('Skipping deploy step. Deploy step was requested to run in job number {0}. Current job number is {1}.' -f $env:DeployInJobNumber, $env:APPVEYOR_JOB_NUMBER) -Verbose
}