-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
33 lines (33 loc) · 1.43 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
version: 1.2.1.{build}
image: Visual Studio 2017
environment:
nugetapikey:
secure: d+MzIFRktdbKIuES/oAyDIM2MAV+aGYtB6J3Ek7paA8EEKUr5nY1LCujyFPkrlSp
install:
- cmd: nuget restore
assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: "{version}"
assembly_file_version: "{version}"
configuration: Release
build:
verbosity: minimal
after_build:
- ps: |
$ManifestPath = "./UncommonSense.PowerShell.TypeData/bin/$($env:CONFIGURATION)/UncommonSense.PowerShell.TypeData.psd1"
Import-Module $ManifestPath -Force
(Get-Command -Module UncommonSense.PowerShell.TypeData -CommandType Cmdlet).Name
Update-ModuleManifest `
-Path $ManifestPath `
-ModuleVersion $env:APPVEYOR_BUILD_VERSION `
-CmdletsToExport (Get-Command -Module UncommonSense.PowerShell.TypeData -CommandType Cmdlet).Name
test_script:
- ps: cd UncommonSense.PowerShell.TypeData/bin/$($env:CONFIGURATION)
- ps: $res = Invoke-Pester -OutputFormat NUnitXml -OutputFile TestsResults.xml -PassThru
- ps: (New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\TestsResults.xml))
- ps: if ($res.FailedCount -gt 0) { throw "$($res.FailedCount) tests failed."}
artifacts:
- path: UncommonSense.PowerShell.TypeData/bin/$(configuration)
on_success:
- ps: Get-ChildItem -Path .; Publish-Module -Path (Get-Item -Path .) -NuGetApiKey $env:NuGetApiKey