-
-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathpsakeFile.ps1
More file actions
43 lines (36 loc) · 1.59 KB
/
psakeFile.ps1
File metadata and controls
43 lines (36 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Properties {
# PSDepend stages files without compiling to a single PSM1
$PSBPreference.Build.CompileModule = $false
# Help generation
$PSBPreference.Help.DefaultLocale = 'en-US'
# Extra subdirectories beyond Public/Private that must be staged
$PSBPreference.Build.CopyDirectories = @('PSDependScripts', 'en-US')
# Test configuration
$PSBPreference.Help.DefaultLocale = 'en-US'
$PSBPreference.Test.OutputFile = 'out/testResults.xml'
$PSBPreference.Test.OutputFormat = 'JUnitXml'
$PSBPreference.Test.ScriptAnalysis.Enabled = $true
$PSBPreference.Test.ScriptAnalysis.FailBuildOnSeverityLevel = 'Error'
$PSBPreference.Test.CodeCoverage.Enabled = $false
# Explicit casing required for Linux (case-sensitive filesystem)
$PSBPreference.Test.RootDir = Join-Path $ENV:BHProjectPath 'Tests'
# Exclude Windows-only tests on non-Windows runners
if (-not $IsWindows) {
$PSBPreference.Test.ExcludeTagFilter = @('WindowsOnly')
}
}
# Pre-set before -FromModule so PowerShellBuild 0.7.x's null-check doesn't override it.
# Skips BuildHelp (GenerateMarkdown) — doc generation is not needed in the test pipeline
# and Build-PSBuildMarkdown has a Remove-Module scope bug specific to PSDepend.
$PSBBuildDependency = @('StageFiles')
Task Default -Depends Test
# PowerShellBuild adds the following tasks:
# - Init
# - Clean
# - StageFiles
# - Build
# - Test
# - BuildHelp
# - GenerateMarkdown
# - Publish
Task Test -FromModule PowerShellBuild -MinimumVersion '0.7.3'