@@ -128,14 +128,9 @@ task Build {
128
128
}
129
129
130
130
task Test - If { ! $script :IsUnix } {
131
- $testParams = @ {}
132
- if ($env: APPVEYOR -ne $null ) {
133
- $testParams = @ {" l" = " appveyor" }
134
- }
135
-
136
- exec { & $script :dotnetExe test - c $Configuration @testParams .\test\PowerShellEditorServices.Test\PowerShellEditorServices.Test.csproj }
137
- exec { & $script :dotnetExe test - c $Configuration @testParams .\test\PowerShellEditorServices.Test.Protocol\PowerShellEditorServices.Test.Protocol.csproj }
138
- exec { & $script :dotnetExe test - c $Configuration @testParams .\test\PowerShellEditorServices.Test.Host\PowerShellEditorServices.Test.Host.csproj }
131
+ exec { & $script :dotnetExe test - c $Configuration .\test\PowerShellEditorServices.Test\PowerShellEditorServices.Test.csproj }
132
+ exec { & $script :dotnetExe test - c $Configuration .\test\PowerShellEditorServices.Test.Protocol\PowerShellEditorServices.Test.Protocol.csproj }
133
+ exec { & $script :dotnetExe test - c $Configuration .\test\PowerShellEditorServices.Test.Host\PowerShellEditorServices.Test.Host.csproj }
139
134
}
140
135
141
136
task LayoutModule - After Build, BuildHost {
@@ -173,14 +168,20 @@ task UploadArtifacts -If ($script:IsCIBuild) {
173
168
}
174
169
}
175
170
176
- task UploadTestLogs - If ($script :IsCIBuild ) {
171
+ task UploadTestLogs - After Test - If ($script :IsCIBuild ) {
172
+ $testLogsPath = " $PSScriptRoot /test/PowerShellEditorServices.Test.Host/bin/$Configuration /net451/logs"
177
173
$testLogsZipPath = " $PSScriptRoot /TestLogs.zip"
178
174
179
- [System.IO.Compression.ZipFile ]::CreateFromDirectory(
180
- " $PSScriptRoot /test/PowerShellEditorServices.Test.Host/bin/$Configuration /net451/logs" ,
181
- $testLogsZipPath )
175
+ if (Test-Path $testLogsPath ) {
176
+ [System.IO.Compression.ZipFile ]::CreateFromDirectory(
177
+ $testLogsPath ,
178
+ $testLogsZipPath )
182
179
183
- Push-AppveyorArtifact $testLogsZipPath
180
+ Push-AppveyorArtifact $testLogsZipPath
181
+ }
182
+ else {
183
+ Write-Host " `n ### WARNING: Test logs could not be found!`n " - ForegroundColor Yellow
184
+ }
184
185
}
185
186
186
187
# The default task is to run the entire CI build
0 commit comments