@@ -17,6 +17,7 @@ function Install-Pester {
17
17
Write-Verbose - Verbose " Installing Pester via Install-Module"
18
18
Install-Module - Name Pester - Force - SkipPublisherCheck - Scope CurrentUser - Repository PSGallery
19
19
}
20
+ Write-Verbose - Verbose ' Installed Pester'
20
21
}
21
22
}
22
23
@@ -27,16 +28,20 @@ function Invoke-AppVeyorInstall {
27
28
[switch ] $SkipPesterInstallation
28
29
)
29
30
30
- if (-not $SkipPesterInstallation.IsPresent ) { Install-Pester }
31
+ $installPowerShellModulesjobs = @ ()
32
+ if (-not $SkipPesterInstallation.IsPresent ) { $installPowerShellModulesjobs += Start-Job ${Function: Install-Pester} }
31
33
32
- if ($null -eq (Get-Module - ListAvailable PowershellGet)) {
33
- # WMF 4 image build
34
- Write-Verbose - Verbose " Installing platyPS via nuget"
35
- nuget install platyPS - source https:// www.powershellgallery.com / api/ v2 - outputDirectory " $Env: ProgramFiles \WindowsPowerShell\Modules\." - ExcludeVersion
36
- }
37
- else {
38
- Write-Verbose - Verbose " Installing platyPS via Install-Module"
39
- Install-Module - Name platyPS - Force - Scope CurrentUser - Repository PSGallery
34
+ $installPowerShellModulesjobs += Start-Job {
35
+ if ($null -eq (Get-Module - ListAvailable PowershellGet)) {
36
+ # WMF 4 image build
37
+ Write-Verbose - Verbose " Installing platyPS via nuget"
38
+ nuget install platyPS - source https:// www.powershellgallery.com / api/ v2 - outputDirectory " $Env: ProgramFiles \WindowsPowerShell\Modules\." - ExcludeVersion
39
+ }
40
+ else {
41
+ Write-Verbose - Verbose " Installing platyPS via Install-Module"
42
+ Install-Module - Name platyPS - Force - Scope CurrentUser - Repository PSGallery
43
+ }
44
+ Write-Verbose - Verbose ' Installed platyPS'
40
45
}
41
46
42
47
# Do not use 'build.ps1 -bootstrap' option for bootstraping the .Net SDK as it does not work well in CI with the AppVeyor Ubuntu image
@@ -70,6 +75,14 @@ function Invoke-AppVeyorInstall {
70
75
[Net.ServicePointManager ]::SecurityProtocol = $originalSecurityProtocol
71
76
Remove-Item .\dotnet- install.*
72
77
}
78
+ Write-Verbose - Verbose ' Installed required .Net CORE SDK'
79
+ }
80
+
81
+ Wait-Job $installPowerShellModulesjobs | Receive-Job
82
+ $installPowerShellModulesjobs | ForEach-Object {
83
+ if ($_.State -eq ' Failed' ) {
84
+ throw ' Installing PowerShell modules failed, see job logs above'
85
+ }
73
86
}
74
87
}
75
88
0 commit comments