Skip to content

Commit

Permalink
better actions output
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael LoPresti committed Oct 15, 2023
1 parent bda169a commit 9656867
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
src/ValidateJson.nuspec
src/ValidateJson.psd1
dist
coverage.xml
coverage.xml
test\**\**
test\result\Pester-Test-Result.XML
testResults.xml
10 changes: 8 additions & 2 deletions ValidateJson.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,14 @@ task analyze {
task test {
if($ci){
New-Item -Path "$BuildRoot\test\" -Name "result" -ItemType "directory" -Force | out-null
Invoke-Pester -OutputFile "$BuildRoot\test\result\Pester-Test-Result.XML" `
-OutputFormat "JUnitXML"
$pesterConfig = New-PesterConfiguration -Hashtable @{
TestResult=@{
Enabled=$true
OutputPath="\test\result\Pester-Test-Result.XML"
OutputFormat="JUnitXml"
}
}
Invoke-Pester -Configuration $pesterConfig
# Invoke-Pester -CodeCoverage "$BuildRoot\src\$module_name.psm1" `
# -CodeCoverageOutputFile "$BuildRoot\test\result\Pester-Coverage.xml" `
# -CodeCoverageOutputFileFormat JaCoCo
Expand Down
7 changes: 5 additions & 2 deletions tools/dev-init.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Install-Module InvokeBuild,PSScriptAnalyzer,platyPS -Scope CurrentUser -Force
Install-Module Pester -Scope CurrentUser -MinimumVersion "5.0.0"
Install-Module "InvokeBuild","PSScriptAnalyzer","platyPS" -Scope CurrentUser -Force
Install-Module "Pester" -Scope CurrentUser -MinimumVersion "5.0.0" -Force

Write-host "Module Versions are"
Get-Module -ListAvailable "InvokeBuild","PSScriptAnalyzer","platyPS","Pester" | Select-Object Name,Version

if($(winget list --id Microsoft.NuGet --disable-interactivity --accept-source-agreements|out-string) -like '*No installed package found*') {
winget install -e --id Microsoft.NuGet --disable-interactivity --accept-source-agreements
Expand Down

0 comments on commit 9656867

Please sign in to comment.