-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.appveyor.yml
59 lines (50 loc) · 1.65 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
image: Visual Studio 2017
branches:
only:
- master
version: "Build {build}"
skip_tags: true
skip_commits:
files:
- .github/
- .vscode/
- images/
- src/
- .gitignore
- CONTRIBUTING.md
- LICENSE
- README.md
environment:
PsgKey:
secure: tlhLuUS6x8FcP159+X/EIBDlj9m+u5KCTTuqwzsiNHlPX6K4AolpaZcfAP4ClOdB
matrix:
- DOCKER_IMAGE:
- DOCKER_IMAGE: nanoserver
- DOCKER_IMAGE: windowsservercore
cache:
- test\download-cache -> .appveyor.yml
- '%ProgramFiles%\WindowsPowerShell\Modules\VcRedist -> .appveyor.yml'
- '%ProgramFiles%\WindowsPowerShell\Modules\PSScriptAnalyzer -> .appveyor.yml'
- '%ProgramFiles%\WindowsPowerShell\Modules\Pester -> .appveyor.yml'
build: off
install:
- ps: |
if ($null -eq $Env:DOCKER_IMAGE -or $Env:DOCKER_IMAGE -eq '') {
.\test\setup.ps1
} else {
& ".\test\Dockerfile.$Env:DOCKER_IMAGE.ps1"
}
test_script:
- ps: |
if ($null -eq $Env:DOCKER_IMAGE -or $Env:DOCKER_IMAGE -eq '') {
$pesterResult = .\test\pester.ps1
$failCount = $pesterResult.FailedCount
} else {
$volume="$($Env:APPVEYOR_BUILD_FOLDER):C:\App"
docker run --rm --volume $volume --workdir C:\App --env "PM_TEST_DOCKER=1" phpmanager/test powershell.exe 'Set-Location -LiteralPath C:\App; $pesterResult=.\test\pester.ps1; exit $pesterResult.FailedCount'
$failCount = $LASTEXITCODE
}
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path -LiteralPath .\TestsResults.xml))
if ($failCount -ne 0) {
throw "$failCount tests failed!"
}