@@ -41,14 +41,6 @@ task Init {
41
41
" Installing the latest version of Pester"
42
42
Install-Module - Name Pester - Repository PSGallery - Scope CurrentUser - AllowClobber - SkipPublisherCheck - Confirm:$false - ErrorAction Stop - Force - Verbose:$false
43
43
Import-Module - Name Pester - Verbose:$false - Force
44
- " Installing the latest version of PSScriptAnalyzer"
45
- Install-Module - Name PSScriptAnalyzer - Repository PSGallery - Scope CurrentUser - AllowClobber - SkipPublisherCheck - Confirm:$false - ErrorAction Stop - Force - Verbose:$false
46
- Import-Module - Name PSScriptAnalyzer - Verbose:$false - Force
47
- if ($env: BHBuildSystem -eq ' VSTS' -and $PSVersionTable.PSVersion.Major -lt 6 ) {
48
- " Installing the latest version of Coveralls"
49
- Install-Module Coveralls - Repository PSGallery - Scope CurrentUser - ErrorAction Stop - Force - Confirm:$false - Verbose:$false
50
- Import-Module Coveralls - Force - Verbose:$false
51
- }
52
44
if ($env: BHProjectName -cne $moduleName ) {
53
45
$env: BHProjectName = $moduleName
54
46
}
@@ -235,22 +227,6 @@ $pesterScriptBlock = {
235
227
PassThru = $true
236
228
Path = $tests
237
229
}
238
- if ($ENV: BHBuildSystem -eq ' VSTS' -and $PSVersionTable.PSVersion.Major -lt 6 -and $null -ne $env: Coveralls ) {
239
- ' Building list of functions to include for Code Coverage...'
240
- $coveredFunctions = @ ()
241
- " $ ( $env: BHPSModulePath ) \Public\Condition Functions\*" , " $ ( $env: BHPSModulePath ) \Public\Intrinsic Functions\*" , " $ ( $env: BHPSModulePath ) \Public\Primary Functions\*" , " $ ( $env: BHPSModulePath ) \Public\Transform\*" , " $ ( $env: BHPSModulePath ) \Public\*-Vaporshell.ps1" | Foreach-Object {
242
- foreach ($item in (Get-Item $_ )) {
243
- $coveredFunctions += @ {
244
- Path = (Join-Path $outputModVerDir " $ ( $env: BHProjectName ) .psm1" )
245
- Function = $item.BaseName
246
- }
247
- }
248
- }
249
- ' Including CodeCoverage report'
250
- # Commented out due to extra time this takes when running against the compiled module
251
- # ## $pesterParams['CodeCoverage'] = $coveredFunctions
252
- $pesterParams [' CodeCoverage' ] = (Join-Path $outputModVerDir " $ ( $env: BHProjectName ) .psm1" )
253
- }
254
230
if ($global :ExcludeTag ) {
255
231
$pesterParams [' ExcludeTag' ] = $global :ExcludeTag
256
232
" Invoking Pester and excluding tag(s) [$ ( $global :ExcludeTag -join ' , ' ) ]..."
@@ -260,12 +236,6 @@ $pesterScriptBlock = {
260
236
}
261
237
$testResults = Invoke-Pester @pesterParams
262
238
' Pester invocation complete!'
263
- if ($ENV: BHBuildSystem -eq ' VSTS' -and $PSVersionTable.PSVersion.Major -lt 6 -and $null -ne $env: Coveralls -and $pesterParams.Keys -contains ' CodeCoverage' ) {
264
- ' Formatting test results into a Coveralls coverage report...'
265
- $coverage = Format-Coverage - PesterResults $TestResults - CoverallsApiToken $env: Coveralls - BranchName $env: BHBranchName - Verbose
266
- ' Uploading coverage report to Coveralls...'
267
- Publish-Coverage - Coverage $coverage - Verbose
268
- }
269
239
if ($testResults.FailedCount -gt 0 ) {
270
240
$testResults | Format-List
271
241
Write-Error - Message ' One or more Pester tests failed. Build cannot continue!'
@@ -298,7 +268,7 @@ task Analyze -Depends Pester {
298
268
}
299
269
} - description ' Run PSScriptAnalyzer'
300
270
301
- Task Deploy - Depends Import {
271
+ Task Deploy - Depends Init {
302
272
function Publish-GitHubRelease {
303
273
<#
304
274
. SYNOPSIS
0 commit comments