Skip to content

Commit 447f967

Browse files
committed
Fix #352: Migrate to new VS 2017 RC AppVeyor image
1 parent 933e475 commit 447f967

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

.build.ps1

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,9 @@ task Build {
128128
}
129129

130130
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 }
139134
}
140135

141136
task LayoutModule -After Build, BuildHost {
@@ -173,14 +168,20 @@ task UploadArtifacts -If ($script:IsCIBuild) {
173168
}
174169
}
175170

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"
177173
$testLogsZipPath = "$PSScriptRoot/TestLogs.zip"
178174

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)
182179

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+
}
184185
}
185186

186187
# The default task is to run the entire CI build

appveyor.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: '0.9.0.{build}'
2-
os: WMF 5
2+
image: Visual Studio 2017 RC
33
clone_depth: 10
44
skip_tags: true
55

@@ -16,11 +16,5 @@ install:
1616
build_script:
1717
- ps: Invoke-Build -Configuration Release
1818

19-
test:
20-
assemblies:
21-
- Microsoft.PowerShell.EditorServices.Test.dll
22-
- Microsoft.PowerShell.EditorServices.Test.Protocol.dll
23-
- Microsoft.PowerShell.EditorServices.Test.Host.dll
24-
25-
after_test:
26-
- ps: Invoke-Build UploadTestLogs -Configuration Release
19+
# The build script takes care of the tests
20+
test: off

0 commit comments

Comments
 (0)