diff --git a/.appveyor.yml b/.appveyor.yml index f584194..20bc418 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -19,7 +19,8 @@ install: # Bootstrap PSDepend and Install Dependencies - ps: | Install-PackageProvider -Name NuGet -MinimumVersion '2.8.5.201' -Force - Install-Module -Name PSDepend -Force; Import-Module -Name PSDepend + Install-Module -Name PSDepend -Scope CurrentUser -Force + Import-Module -Name PSDepend Invoke-PSDepend '.\REQUIREMENTS.psd1' -Force diff --git a/.scripts/build.ps1 b/.scripts/build.ps1 index 631f58b..72c092f 100644 --- a/.scripts/build.ps1 +++ b/.scripts/build.ps1 @@ -189,15 +189,18 @@ Task TestModule -Description "Run Pester Tests and CoeCoverage" -Depends Install if (Test-Path "$($invokePester.Path)\cultures.json") { $invokePester.Add('EnableExit', $true) $currentCulture = Get-Culture + + $invokePester | Export-Clixml "${env:Temp}\invokePester.xml" + foreach ($culture in (Get-Content "$($invokePester.Path)\cultures.json" | ConvertFrom-Json)) { Set-Culture -CultureInfo $culture - $res = powershell.exe Invoke-Pester @invokePester - # Write-Host "[BUILD TestModule] Pester Result: $($res | ConvertTo-Json)" -ForegroundColor Magenta + $res = & powershell.exe -c "`$invokePester = Import-Clixml `"`${env:Temp}\invokePester.xml`"; Invoke-Pester @invokePester" + Write-Host "[BUILD TestModule] Pester Result: $($res | Out-String)" -ForegroundColor Magenta } Set-Culture -CultureInfo $currentCulture } else { $res = Invoke-Pester @invokePester - # Write-Host "[BUILD TestModule] Pester Result: $($res | ConvertTo-Json)" -ForegroundColor Magenta + Write-Host "[BUILD TestModule] Pester Result: $($res | Out-String)" -ForegroundColor Magenta } $exportCodeCovIoJson = @{ diff --git a/.scripts/deploy.ps1 b/.scripts/deploy.ps1 index d6c665d..874ff66 100644 --- a/.scripts/deploy.ps1 +++ b/.scripts/deploy.ps1 @@ -3,12 +3,12 @@ - https://github.com/RamblingCookieMonster/PSDeploy #> $PSScriptRootParent = Split-Path $PSScriptRoot -Parent -Write-Host "[Deploy] APPVEYOR_PROJECT_NAME: ${env:APPVEYOR_PROJECT_NAME}" -Foregroundcolor 'Magenta' -BackgroundColor 'Blue' -Write-Host "[Deploy] PSScriptRootParent: ${PSScriptRootParent}" -Foregroundcolor 'Magenta' -BackgroundColor 'Blue' -Write-Host "[Deploy] Path Exists (${PSScriptRootParent}): $(Test-Path $PSScriptRootParent)" -Foregroundcolor 'Magenta' -BackgroundColor 'Blue' -Write-Host "[Deploy] Path Exists (${PSScriptRootParent}\dev): $(Test-Path "${PSScriptRootParent}\dev")" -Foregroundcolor 'Magenta' -BackgroundColor 'Blue' -Write-Host "[Deploy] Path Exists (${PSScriptRootParent}\dev\BuildOutput): $(Test-Path "${PSScriptRootParent}\dev\BuildOutput")" -Foregroundcolor 'Magenta' -BackgroundColor 'Blue' -Write-Host "[Deploy] Path Exists (${PSScriptRootParent}\dev\BuildOutput\QuserObject): $(Test-Path "${PSScriptRootParent}\dev\BuildOutput\QuserObject")" -Foregroundcolor 'Magenta' -BackgroundColor 'Blue' +Write-Host "[Deploy] APPVEYOR_PROJECT_NAME: ${env:APPVEYOR_PROJECT_NAME}" -Foregroundcolor 'Magenta' +Write-Host "[Deploy] PSScriptRootParent: ${PSScriptRootParent}" -Foregroundcolor 'Magenta' +Write-Host "[Deploy] Path Exists (${PSScriptRootParent}): $(Test-Path $PSScriptRootParent)" -Foregroundcolor 'Magenta' +Write-Host "[Deploy] Path Exists (${PSScriptRootParent}\dev): $(Test-Path "${PSScriptRootParent}\dev")" -Foregroundcolor 'Magenta' +Write-Host "[Deploy] Path Exists (${PSScriptRootParent}\dev\BuildOutput): $(Test-Path "${PSScriptRootParent}\dev\BuildOutput")" -Foregroundcolor 'Magenta' +Write-Host "[Deploy] Path Exists (${PSScriptRootParent}\dev\BuildOutput\QuserObject): $(Test-Path "${PSScriptRootParent}\dev\BuildOutput\QuserObject")" -Foregroundcolor 'Magenta' Deploy Module { By PSGalleryModule QuserObject {