-
Notifications
You must be signed in to change notification settings - Fork 3
/
appveyor.yml
41 lines (30 loc) · 1.24 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
version: 1.0.0.{build}
image: Visual Studio 2017
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
install:
- ps: >-
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module Pester -RequiredVersion 4.3.1 -Scope CurrentUser -Force -SkipPublisherCheck
Install-Module InvokeBuild -RequiredVersion 5.4.1 -Scope CurrentUser -Force
Install-Module platyPS -RequiredVersion 0.9.0 -Scope CurrentUser -Force
choco install codecov --no-progress
build_script:
- ps: >-
. "$PWD\build.ps1" -Force
$resultsFile = "$PWD\testresults\pester.xml"
$passed = (Test-Path $resultsFile) -and 0 -eq ([int]([xml](Get-Content $resultsFile -Raw)).'test-results'.failures)
if ($passed) {
[System.Net.WebClient]::new().UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", $resultsFile)
codecov -f "$PWD\testresults\opencover.xml"
} else {
$Error | Format-List * -Force
exit 1;
}
on_finish:
- ps: >-
Add-Type -AssemblyName System.IO.Compression.FileSystem
$zipPath = "$pwd\PSLambda.zip"
[System.IO.Compression.ZipFile]::CreateFromDirectory("$pwd\Release", $zipPath)
Push-AppveyorArtifact $zipPath