File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 - name : Install Report Generator
3636 run : dotnet tool install --global dotnet-reportgenerator-globaltool
3737
38+ - name : Find Coverage Files
39+ shell : pwsh
40+ run : |
41+ Write-Host "Looking for coverage files..."
42+ Get-ChildItem -Path . -Filter "*.cobertura.xml" -Recurse | ForEach-Object { Write-Host $_.FullName }
43+
3844 - name : Generate Coverage Report
45+ shell : pwsh
3946 run : |
40- reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"coverage-report" -reporttypes:"HtmlInline;Markdown"
47+ $coverageFile = Get-ChildItem -Path . -Filter "*.cobertura.xml" -Recurse | Select-Object -First 1
48+ if ($null -ne $coverageFile) {
49+ Write-Host "Found coverage file: $($coverageFile.FullName)"
50+ reportgenerator -reports:"$($coverageFile.FullName)" -targetdir:"coverage-report" -reporttypes:"HtmlInline;Markdown"
51+ } else {
52+ Write-Host "No coverage files found, creating dummy report"
53+ New-Item -ItemType Directory -Path "coverage-report" -Force | Out-Null
54+ "# Coverage Report`n`nNo coverage data available." | Out-File -FilePath "coverage-report/Summary.md" -Encoding UTF8
55+ }
4156
4257 - name : Generate Test Report
4358 if : always()
You can’t perform that action at this time.
0 commit comments