Skip to content

Commit c705ade

Browse files
committed
ci(ui-tests): upload the test logs
The test logs are quite interesting to have, and not only those: In case of a fatal failure, the test directory is valuable information, too. Let's always upload them as build artifacts. For convenience, let's just reuse the `ui-tests/` directory as the place to put all of those files; Technically, we do not need the files in there that are tracked by Git, but practically speaking, it is neat to have them packaged in the same `.zip` file as the test logs and stuff. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent fa5d153 commit c705ade

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/ui-tests.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,20 @@ jobs:
8383
ui-tests
8484
- name: Run UI tests
8585
id: ui-tests
86+
working-directory: ui-tests
8687
run: |
8788
$exitCode = 0
88-
& "${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" /ErrorStdOut /force ui-tests\background-hook.ahk "$PWD\bg-hook" 2>&1 | Out-Default
89+
& "${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" /ErrorStdOut /force background-hook.ahk "$PWD\bg-hook" 2>&1 | Out-Default
8990
if (!$?) { $exitCode = 1; echo "::error::Test failed!" } else { echo "::notice::Test log" }
9091
type bg-hook.log
9192
exit $exitCode
9293
- name: Show logs, if canceled
9394
if: cancelled()
95+
working-directory: ui-tests
9496
run: type bg-hook.log
97+
- name: Upload test results
98+
if: always()
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: ui-tests-${{ matrix.os }}
102+
path: ui-tests

0 commit comments

Comments
 (0)