Skip to content

Commit 417cef9

Browse files
🩹 [Patch]: Add tests for logging commands for GitHub Actions workflow (#51)
## Description This pull request adds tests various log functions that work in GitHub Actions. Logging enhancements: * [`.github/workflows/TestWorkflow.yml`](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cR157-R166): Added some tests to show how log notices, warnings, errors, debug messages, and styled log messages with foreground and background colors work.
1 parent d5ee054 commit 417cef9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

‎.github/workflows/TestWorkflow.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ jobs:
154154
Set-GitHubEnvironmentVariable -Name 'OCTOCAT' -Value $cat
155155
}
156156
157+
LogGroup 'Write to GitHub Actions' {
158+
Write-GitHubNotice -Message $zen -Title 'GitHub Zen'
159+
Write-GitHubWarning -Message 'This is a warning message'
160+
Write-GitHubError -Message 'This is an error message'
161+
Write-GitHubDebug -Message 'This is a debug message'
162+
Write-GitHubLog -Message 'This is a log message' -ForegroundColor Green -BackgroundColor Yellow
163+
}
164+
157165
LogGroup 'Set outputs - WISECAT' {
158166
Set-GitHubOutput -Name 'WISECAT' -Value $cat
159167
}

0 commit comments

Comments
 (0)