Skip to content

🌟 [Major]: Introducing Get-PesterCodeCoverage #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 75 commits into from
Apr 17, 2025
Merged
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
b7a5559
Update action.yml and main.ps1 for Get-PesterCodeCoverage GitHub Action
MariusStorhaug Mar 3, 2025
09ebe97
Add functionality to merge coverage reports and output a combined XML…
MariusStorhaug Mar 3, 2025
92c4c6b
Refactor main.ps1 to improve code readability and maintainability by …
MariusStorhaug Mar 3, 2025
9b4e9c9
Enhance code coverage logging by summarizing JSON content and improvi…
MariusStorhaug Mar 3, 2025
434e58b
Refactor logging in main.ps1 to improve output format and remove unus…
MariusStorhaug Mar 3, 2025
dcea16b
Sort CodeCoverage files by name for improved output consistency
MariusStorhaug Mar 3, 2025
9fc1d1e
Refactor log group names in main.ps1 for clarity and consistency
MariusStorhaug Mar 3, 2025
dcb81ba
Refactor log group naming in main.ps1 for improved clarity
MariusStorhaug Mar 3, 2025
56cc096
Update log group naming in main.ps1 for improved readability
MariusStorhaug Mar 3, 2025
138b773
Enhance summary log group formatting in main.ps1 for better visual se…
MariusStorhaug Mar 3, 2025
b195b10
Refactor coverage report generation in main.ps1 for improved clarity …
MariusStorhaug Mar 4, 2025
461df5e
Enhance code coverage reporting in main.ps1 with detailed output and …
MariusStorhaug Mar 4, 2025
369d74a
Add module installation and improve coverage report formatting in mai…
MariusStorhaug Mar 4, 2025
a9e6210
Refactor markdown output in main.ps1 for improved structure and clarity
MariusStorhaug Mar 4, 2025
90b4d63
Sort commands in coverage report for improved readability and organiz…
MariusStorhaug Mar 4, 2025
910a27e
Add helper function to convert file paths to relative format in main.ps1
MariusStorhaug Mar 4, 2025
7159c76
Remove unnecessary formatting from code coverage report tables for cl…
MariusStorhaug Mar 4, 2025
7c985c5
Update details in coverage report to include counts for missed, execu…
MariusStorhaug Mar 4, 2025
9ff9cb7
Rename Convert-ToRelativePath function to ConvertTo-RelativePath for …
MariusStorhaug Mar 4, 2025
4002aec
Update coverage check to use Write-GitHubError and Write-GitHubNotice…
MariusStorhaug Mar 4, 2025
32b596d
Enhance code coverage report by formatting command output with markdo…
MariusStorhaug Mar 4, 2025
83ce1ab
Refactor code coverage report to generate HTML tables for missed and …
MariusStorhaug Mar 4, 2025
b7bd674
Refactor HTML table generation in coverage report for missed and exec…
MariusStorhaug Mar 4, 2025
756cfd7
Refactor command output in coverage report to remove HTML encoding, e…
MariusStorhaug Mar 5, 2025
c1c64d3
Normalize file paths in coverage report and transform command output …
MariusStorhaug Mar 5, 2025
43b589e
Refactor command output in coverage report to HTML encode commands an…
MariusStorhaug Mar 5, 2025
215ea4a
Refactor command output in coverage report to replace spaces with non…
MariusStorhaug Mar 5, 2025
0721fdd
Refactor command output in coverage report to remove HTML encoding, e…
MariusStorhaug Mar 5, 2025
3d85c7c
Add Normalize-IndentationExceptFirst function to adjust indentation i…
MariusStorhaug Mar 5, 2025
43b1b82
Refactor command output in coverage report to use preformatted text f…
MariusStorhaug Mar 5, 2025
763bd4b
Refactor command output in coverage report to use code formatting for…
MariusStorhaug Mar 5, 2025
3cd3042
Refactor Normalize-IndentationExceptFirst function to use HTML line b…
MariusStorhaug Mar 5, 2025
6e0f3d4
Refactor command output formatting in coverage report to enhance read…
MariusStorhaug Mar 5, 2025
6775fb3
Escape curly braces in command output for improved HTML rendering in …
MariusStorhaug Mar 5, 2025
e4c7cd3
Remove unnecessary escaping of curly braces in command output for imp…
MariusStorhaug Mar 5, 2025
cf7b9af
Add inline style for preserving whitespace in command output for impr…
MariusStorhaug Mar 5, 2025
29692b5
Refactor command output formatting in coverage report to escape curly…
MariusStorhaug Mar 5, 2025
19a2258
Fix HTML attribute quotes in command output formatting for consistency
MariusStorhaug Mar 5, 2025
d87ad46
Update code block language from 'pwsh' to 'powershell' for improved s…
MariusStorhaug Mar 5, 2025
1d6ab4e
Refactor command output formatting to ensure consistent HTML renderin…
MariusStorhaug Mar 5, 2025
f69b4a2
Fix command output formatting to ensure consistent HTML rendering in …
MariusStorhaug Mar 5, 2025
925ce64
Refactor command output to build HTML tables for missed and executed …
MariusStorhaug Mar 5, 2025
6f0346e
Refactor command output processing to improve HTML encoding and inden…
MariusStorhaug Mar 5, 2025
3e438fb
Remove HTML encoding from command output for missed and executed comm…
MariusStorhaug Mar 5, 2025
dfd9702
Refactor command processing to improve handling of missed and execute…
MariusStorhaug Mar 5, 2025
1225f8e
Replace HTML line break with environment-specific new line in indenta…
MariusStorhaug Mar 5, 2025
8b9d99d
Refactor command output to separate display for executed commands, im…
MariusStorhaug Mar 5, 2025
782ade6
Refactor command handling to streamline normalization of missed and e…
MariusStorhaug Mar 5, 2025
b023068
Enhance coverage report by listing analyzed files in a clearer format
MariusStorhaug Mar 6, 2025
ef5637f
Update default working directory in action.yml to use a relative path
MariusStorhaug Mar 6, 2025
e2b31bc
Remove GITHUB_TOKEN environment variable from Auto-Release workflow
MariusStorhaug Mar 8, 2025
c1faae5
Add path normalization function for PSModulePath and update file proc…
MariusStorhaug Mar 9, 2025
3c894b9
Refactor path normalization in ConvertTo-NormalizedModulePath functio…
MariusStorhaug Mar 9, 2025
20bbc3e
Refactor ConvertTo-NormalizedModulePath for improved readability and …
MariusStorhaug Mar 9, 2025
6908310
Refactor path normalization logic and remove unused ConvertTo-Relativ…
MariusStorhaug Mar 9, 2025
134c719
Refactor file path normalization logic and simplify output formatting…
MariusStorhaug Mar 9, 2025
f89342c
Implement retry logic for module installation in main.ps1 to enhance …
MariusStorhaug Mar 9, 2025
c80b707
Sort and remove duplicates from FilesAnalyzed in main.ps1 for improve…
MariusStorhaug Mar 9, 2025
e434034
Add StepSummary_Mode input to control GitHub step summary sections in…
MariusStorhaug Mar 13, 2025
ab58843
Refactor JSON file processing in main.ps1 to improve path normalizati…
MariusStorhaug Mar 13, 2025
9b8919d
Remove unnecessary blank line in main.ps1 for cleaner code formatting
MariusStorhaug Mar 13, 2025
dd7da3d
Update log output to use BaseName instead of Name for improved clarit…
MariusStorhaug Mar 13, 2025
0964127
Round coverage percentages to two decimal places for improved readabi…
MariusStorhaug Mar 13, 2025
01eb305
Add logging for file listing and improve group name formatting in mai…
MariusStorhaug Mar 13, 2025
f618ace
Remove '-CodeCoverage-Report' suffix from group name for cleaner outp…
MariusStorhaug Mar 13, 2025
df2c4dc
Add CodeCoveragePercentTarget input to action.yml and update main.ps1…
MariusStorhaug Mar 23, 2025
87db5ed
Add optional CodeCoveragePercentTarget input to action.yml and enhanc…
MariusStorhaug Mar 24, 2025
e397d4e
Add ShowInfo input to action.yml for improved script execution control
MariusStorhaug Mar 25, 2025
edacad4
Add success indicator
MariusStorhaug Mar 26, 2025
3d6cfbe
Rename log group titles to include 'Step Summary' for improved clarit…
MariusStorhaug Mar 26, 2025
268af1d
Add initial code coverage report for PSModuleTest
MariusStorhaug Apr 17, 2025
349704d
Refactor documentation formatting in Helpers.psm1 and update comment …
MariusStorhaug Apr 17, 2025
a9bc669
Update CodeCoveragePercentTarget to 50 in Action-Test.yml for adjuste…
MariusStorhaug Apr 17, 2025
5097429
Update README.md to specify markdown formatting for example summary
MariusStorhaug Apr 17, 2025
06798d4
Enhance descriptions for StepSummary_Mode in README.md and action.yml…
MariusStorhaug Apr 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove HTML encoding from command output for missed and executed comm…
…ands in coverage report
  • Loading branch information
MariusStorhaug committed Mar 5, 2025
commit 3e438fb99df8de49a99ccfb9ddbf09c34b51ba57
4 changes: 2 additions & 2 deletions scripts/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ LogGroup 'Set table for missed commands' {
$missedForDisplay = $tableheader

foreach ($item in $codeCoverage.CommandsMissed | Sort-Object -Property File, Line) {
$command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
# $command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
$command = Normalize-IndentationExceptFirst -Code $command
# $command = $command.Replace([Environment]::NewLine, '<br>').Replace(' ', '&nbsp;').Replace('{', '\{').Replace('}', '\}')
$missedForDisplay += @"
Expand Down Expand Up @@ -192,7 +192,7 @@ LogGroup 'Set table for executed commands' {
$missedForDisplay = $tableheader

foreach ($item in $codeCoverage.CommandsExecuted | Sort-Object -Property File, Line) {
$command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
# $command = [System.Web.HttpUtility]::HtmlEncode($item.Command)
$command = Normalize-IndentationExceptFirst -Code $command
# $command = $command.Replace([Environment]::NewLine, '<br>').Replace(' ', '&nbsp;').Replace('{', '\{').Replace('}', '\}')
$missedForDisplay += @"
Expand Down