-
Notifications
You must be signed in to change notification settings - Fork 29
/
appveyor.yml
38 lines (32 loc) · 1.25 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
version: 1.4.3.{build}
image:
- Visual Studio 2015
- Visual Studio 2017
- Visual Studio 2019
- Ubuntu
- macOS
install:
- ps: Install-Module Pester -MinimumVersion 4.0 -MaximumVersion 4.99 -Scope CurrentUser -Force
build: false
test_script:
- ps: |
Import-Module Pester -MinimumVersion 4.0 -MaximumVersion 4.99
$testResultsFile = ".\TestsResults.xml"
$res = Invoke-Pester -OutputFormat NUnitXml -OutputFile $testResultsFile -PassThru
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path $testResultsFile))
if ($res.FailedCount -gt 0) {
throw "$($res.FailedCount) tests failed."
}
deploy: off
on_finish:
- ps: |
# Only publish one artifact
if($IsWindows -eq $False) { return }
$stagingDirectory = (Resolve-Path .).Path
$zipFile = Join-Path $stagingDirectory "$(Split-Path $pwd -Leaf).zip"
Add-Type -assemblyname System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::CreateFromDirectory((Join-Path $pwd 'ZLocation'), $zipFile)
@(
# You can add other artifacts here
(ls $zipFile)
) | % { Push-AppveyorArtifact $_.FullName }