Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
PavanMudigonda committed Jan 1, 2024
1 parent 6832252 commit a6557f0
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions action.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ function Build-SummaryReport
if (-not $script:coverage_report_name) {
$script:coverage_report_name = "COVERAGE_RESULTS_$([datetime]::Now.ToString('yyyyMMdd_hhmmss'))"
}

if (-not $coverage_report_title) {
$script:coverage_report_title = $script:coverage_report_name
}
Expand All @@ -112,8 +113,13 @@ function Build-SummaryReport
-mdFile $script:coverage_summary_path -xslParams @{
reportTitle = $script:coverage_report_title
}
}


}
function Publish-JobSummary {
$coverageSummary = [System.IO.File]::ReadAllText($script:coverage_summary_path)
Set-ActionOutput -Name coverageSummary -Value $coverageSummary
}

function Parse-CoverageXML {
# Parse XML
Expand Down Expand Up @@ -365,11 +371,10 @@ if ($inputs.skip_check_run -ne $true -and $inputs.publish_only_summary -eq $true

Publish-ToCheckRun -ReportData $coverageSummaryData -ReportName $script:coverage_report_name -ReportTitle $script:coverage_report_title -outcome $Script:status -coveragePercentage $script:coveragePercentageString

# Update-PRCheck -ReportData $script:coverageSummaryData -ReportName $coverage_report_name -ReportTitle $script:messageToDisplay

Enforce-QualityGate

Publish-JobSummary

Set-ActionOutput -Name coverageSummary -Value $script:coverageSummaryData
}
elseif ($inputs.skip_check_run -ne $true -and $inputs.publish_only_summary -ne $true )
{
Expand All @@ -388,11 +393,9 @@ elseif ($inputs.skip_check_run -ne $true -and $inputs.publish_only_summary -ne $

Publish-ToCheckRun -ReportData $coverageSummaryData -ReportName $script:coverage_report_name -ReportTitle $script:coverage_report_title -outcome $script:status -coveragePercentage $script:coveragePercentageString

# Update-PRCheck -ReportData $script:coverageSummaryData -ReportName $coverage_report_name -ReportTitle $script:messageToDisplay

Enforce-QualityGate
Set-ActionOutput -Name coverageSummary -Value $script:coverageSummaryData

Publish-JobSummary
}
elseif ($inputs.skip_check_run -eq $true -and $inputs.publish_only_summary -eq $true )
{
Expand All @@ -409,10 +412,9 @@ elseif ($inputs.skip_check_run -eq $true -and $inputs.publish_only_summary -eq $

Set-Output

$coverageSummary = [System.IO.File]::ReadAllText($script:coverage_summary_path)

Enforce-QualityGate
Set-ActionOutput -Name coverageSummary -Value $script:coverageSummary

Publish-JobSummary
}
else {
Build-CoverageReport
Expand All @@ -427,10 +429,9 @@ else {

Set-Output

$coverageSummary = [System.IO.File]::ReadAllText($script:coverage_summary_path)

Enforce-QualityGate

Set-ActionOutput -Name coverageSummary -Value $script:coverageSummary
Publish-JobSummary

}

0 comments on commit a6557f0

Please sign in to comment.