Skip to content

Commit f16b376

Browse files
committed
ci(ui-tests): enforce a sensible timeout
The `ui-tests` job currently takes around half a minute to a minute. Therefore it is quite alarming when the job times out after the default of 6h. Let's let it time out after 10 minutes (we can always increase it when more tests are added). Unfortunately, this changes the failure mode and `cancelled()` will no longer return `true`. Which means that the existing `if:` clauses have to be adapted for showing the logs and taking & uploading a screenshot. While thinking of the logs, I realized that it would be good also to have them in the case that the run succeeded, so let's always show them. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5fbae4f commit f16b376

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/ui-tests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,16 @@ jobs:
8383
ui-tests
8484
- name: Run UI tests
8585
id: ui-tests
86+
timeout-minutes: 10
8687
working-directory: ui-tests
8788
run: |
8889
$exitCode = 0
8990
& "${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" /ErrorStdOut /force background-hook.ahk "$PWD\bg-hook" 2>&1 | Out-Default
9091
if (!$?) { $exitCode = 1; echo "::error::Test failed!" } else { echo "::notice::Test log" }
9192
type bg-hook.log
9293
exit $exitCode
93-
- name: Show logs, if canceled
94-
if: cancelled()
94+
- name: Show logs
95+
if: always()
9596
working-directory: ui-tests
9697
run: type bg-hook.log
9798
- name: Take screenshot, if canceled

0 commit comments

Comments
 (0)