@@ -16,13 +16,19 @@ Function Invoke-InstallDependencies() {
1616
1717 Process {
1818 Try {
19+ Write-Host ' Available PS modules are:' - ForegroundColor Green - BackgroundColor Black
20+ Get-Module - ListAvailable - Name Pester | Format-Table | Out-String
1921 Get-PackageProvider - ListAvailable
2022 Install-PackageProvider - Name NuGet - RequiredVersion ' 2.8.5.208' - Force - Verbose
2123 Import-PackageProvider - Name NuGet - RequiredVersion ' 2.8.5.208' - Force
22- Install-Module - Name ' Pester' - Scope CurrentUser - RequiredVersion ' 4.4.2' - Force - SkipPublisherCheck - AllowClobber
23- Install-Module - Name ' posh-git' - Scope CurrentUser - RequiredVersion ' 1.0.0-beta2' - Force - SkipPublisherCheck - AllowClobber - AllowPrerelease
24- Install-Module - Name ' PSCoverage' - Scope CurrentUser - Force - SkipPublisherCheck - AllowClobber - RequiredVersion ' 1.0.78'
25- Import-Module - Name ' Pester' , ' posh-git' , ' PSCoverage'
24+ Write-Host ' Installing build deps...' - ForegroundColor Red - BackgroundColor Black
25+ Install-Module - Name ' Pester' - Scope CurrentUser - RequiredVersion ' 4.10.1' - Force - SkipPublisherCheck - AllowClobber - Verbose
26+ Install-Module - Name ' posh-git' - Scope CurrentUser - RequiredVersion ' 0.7.3' - Force - SkipPublisherCheck - AllowClobber
27+ Install-Module - Name ' PSCoverage' - Scope CurrentUser - Force - SkipPublisherCheck - AllowClobber - RequiredVersion ' 1.2.108' - Verbose
28+ Import-Module - Name ' posh-git'
29+ Remove-Module - Name ' Pester' - Force - ErrorAction SilentlyContinue
30+ Import-Module - Name ' Pester' - RequiredVersion ' 4.10.1' - Verbose - Force
31+ Import-Module - Name ' PSCoverage' - RequiredVersion ' 1.2.108' - Verbose - Force
2632 }
2733 Catch {
2834 $MsgParams = @ {
@@ -33,7 +39,8 @@ Function Invoke-InstallDependencies() {
3339 Add-AppveyorMessage @MsgParams
3440 Throw $MsgParams.Message
3541 }
36-
42+ Write-Host ' Loaded PS modules are:' - ForegroundColor Green - BackgroundColor Black
43+ Get-Module - Name Pester | Format-Table | Out-String
3744 }
3845}
3946Function Invoke-AppVeyorBumpVersion () {
@@ -42,7 +49,7 @@ Function Invoke-AppVeyorBumpVersion() {
4249
4350 Write-Host " Listing Env Vars for debugging:" - ForegroundColor Black - BackgroundColor Yellow
4451 # Filter Results to prevent exposing secure vars.
45- Get-ChildItem - Path " Env:*" | Where-Object { $_.name -notmatch " (NuGetToken|CoverallsToken) " } | Sort-Object - Property Name | Format-Table
52+ Get-ChildItem - Path " Env:*" | Where-Object { $_.name -notmatch " (NuGetToken|CoverallsToken|CodeCovToken) " } | Sort-Object - Property Name | Format-Table
4653
4754 Try {
4855 $ModManifest = Get-Content - Path (" .\src\{0}.psd1" -f $CALLSIGN )
@@ -112,6 +119,7 @@ Function Invoke-AppVeyorTests() {
112119 Write-Warning - Message (' Could not find file: {0} !' -f $File.FullName )
113120 }
114121 }
122+ Write-Host ' ===== Preload done. =====' - ForegroundColor Black - BackgroundColor Yellow
115123 }
116124 catch {
117125 $_.Exception.Message | Write-Error
@@ -121,7 +129,7 @@ Function Invoke-AppVeyorTests() {
121129 # $testresults = Invoke-Pester -Path ( Get-ChildItem -Path ".\tests\*.Tests.ps1" -Recurse | Sort-Object -Property Name ) -ExcludeTag 'Disabled' -PassThru
122130 $srcFiles = Get-ChildItem - Path " .\src\*.ps1" - Recurse | Sort-Object - Property ' Name' | Select-Object - ExpandProperty ' FullName'
123131 $testFiles = Get-ChildItem - Path " .\tests\*.Tests.ps1" - Recurse | Sort-Object - Property ' Name' | Select-Object - ExpandProperty ' FullName'
124- $TestResults = Invoke-Pester - Path $testFiles - CodeCoverage $srcFiles - PassThru
132+ $TestResults = Invoke-Pester - Path $testFiles - CodeCoverage $srcFiles - PassThru - CodeCoverageOutputFile " .\coverage.xml " - CodeCoverageOutputFileEncoding ascii - CodeCoverageOutputFileFormat JaCoCo
125133 ForEach ($Item in $TestResults.TestResult ) {
126134 Switch ($Item.Result ) {
127135 " Passed" {
@@ -193,6 +201,7 @@ Function Invoke-CoverageReport() {
193201 Publish-CoverageReport - CoverageReport $CoverageReport
194202}
195203
204+
196205Function Invoke-AppVeyorPSGallery () {
197206 [CmdletBinding ()]
198207 Param (
0 commit comments