Skip to content

Commit 0be3017

Browse files
committed
ci(ui-tests): use a better way to call AutoHotKey
By using the `/ErrorStdOut` flag (which required `| Out-Default` because `AutoHotKey64.exe` is a GUI program and would therefore not show any stderr otherwise), we can avoid those blocking dialogs that are so hard to diagnose when running AutoHotKey in a GitHub workflow. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 696ac94 commit 0be3017

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/ui-tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,8 @@ jobs:
8484
- name: Run UI tests
8585
id: ui-tests
8686
run: |
87-
$p = Start-Process -PassThru -FilePath "${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" -ArgumentList ui-tests\background-hook.ahk, "$PWD\bg-hook"
88-
$p.WaitForExit()
89-
if ($p.ExitCode -ne 0) { echo "::error::Test failed!" } else { echo "::notice::Test log" }
87+
"${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" /ErrorStdOut /force ui-tests/ctrl-c.ahk ui-tests\background-hook.ahk "$PWD\bg-hook" 2>&1 | Out-Default
88+
if (!$?) { echo "::error::Test failed!" } else { echo "::notice::Test log" }
9089
type bg-hook.log
9190
if ($p.ExitCode -ne 0) { exit 1 }
9291
- name: Show logs, if canceled

0 commit comments

Comments
 (0)