-
Notifications
You must be signed in to change notification settings - Fork 1
/
appveyor.yml
38 lines (37 loc) · 1.52 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.0.{build}
before_build:
- cmd: >-
git submodule update --init --recursive
nuget restore Fasdr\fasdrPowershell.sln
echo Installing pester...
cinst pester
#nuget install platyPS -Version 0.4.0 -source https://www.powershellgallery.com/api/v2 -outputDirectory . -ExcludeVersion
#Import-Module .\platyPS
#.\platyPS\New-ExternalHelp %APPVEYOR_BUILD_FOLDER%\docs -Force -OutputPath %APPVEYOR_BUILD_FOLDER%\Fasdr.PowerShell\en-US
#Get-HelpPreview .\Fasdr.PowerShell\en-US\Fasdr.psm1-help.xml > Fasdr.txt
build:
project: Fasdr/fasdrPowershell.sln
parallel: true
verbosity: minimal
test_script:
- ps: |
$testResultsFile = ".\TestsResults.xml"
$res = Invoke-Pester -Script .\Fasdr.Powershell\Fasdr.tests.ps1 -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."
}
after_build:
- cmd: >-
7z a Fasdr.zip %APPVEYOR_BUILD_FOLDER%\fasdr.PowerShell\*.dll %APPVEYOR_BUILD_FOLDER%\fasdr.PowerShell\*.psm1 %APPVEYOR_BUILD_FOLDER%\fasdr.PowerShell\*.psd1 %APPVEYOR_BUILD_FOLDER%\fasdr.PowerShell\Fasdr.ArgumentCompleters.ps1
appveyor PushArtifact Fasdr.zip
artifacts:
- path: fasdr\fasdr.PowerShell\*.*
name: fasd_module
notifications:
- provider: Email
to:
on_build_success: true
on_build_failure: true
on_build_status_changed: true