@@ -7,13 +7,6 @@ parameters:
7
7
default : false
8
8
9
9
steps :
10
- - task : PowerShell@2
11
- displayName : PowerShell version
12
- inputs :
13
- targetType : inline
14
- script : $PSVersionTable
15
- pwsh : ${{ parameters.pwsh }}
16
-
17
10
- checkout : self
18
11
19
12
# NOTE: We either checkout the Git repo for PowerShellEditorServices, or we
@@ -64,25 +57,28 @@ steps:
64
57
65
58
# The build script is always run with PowerShell Core
66
59
- task : PowerShell@2
67
- displayName : Build Package
60
+ displayName : Build and package
68
61
inputs :
69
62
targetType : inline
70
63
script : |
71
- Get-ChildItem env:
72
- Get-Module -ListAvailable Pester
73
64
Install-Module InvokeBuild -Scope CurrentUser -Force
74
65
Install-Module platyPS -Scope CurrentUser -Force
75
66
Invoke-Build -Configuration Release Package
76
67
$PackageJson = Get-Content -Raw package.json | ConvertFrom-Json
77
68
Write-Host "##vso[task.setvariable variable=vsixPath]$(Resolve-Path powershell-$($PackageJson.version).vsix)"
78
69
workingDirectory : $(Build.SourcesDirectory)/vscode-powershell
70
+ pwsh : true
79
71
80
72
# Tests in particular are run with either PowerShell Core or Windows PowerShell
81
73
- task : PowerShell@2
82
- displayName : Test
74
+ displayName : Run unit tests
83
75
inputs :
84
76
targetType : inline
85
77
script : |
78
+ $PSVersionTable
79
+ Get-ChildItem env:
80
+ Get-Module -ListAvailable Pester
81
+ Install-Module InvokeBuild -Scope CurrentUser -Force
86
82
Invoke-Build -Configuration Release Test
87
83
workingDirectory : $(Build.SourcesDirectory)/vscode-powershell
88
84
pwsh : ${{ parameters.pwsh }}
97
93
Write-Host '##vso[task.LogIssue type=error;]PowerShell Editor Services bits were not built in release configuration!'
98
94
exit 1
99
95
}
96
+ pwsh : true
100
97
101
98
- publish : $(vsixPath)
102
99
artifact : vscode-powershell-vsix-$(System.JobId)
0 commit comments