Skip to content

Commit 5e9c827

Browse files
committed
amend! ci(ui-tests): enforce a sensible timeout
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 df65c63 commit 5e9c827

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/ui-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ jobs:
121121
if ($p2.ExitCode -ne 0) { echo "::error::Ctrl+C Test failed!" } else { echo "::notice::Ctrl+C Test log" }
122122
type ctrl-c.log
123123
if ($p.ExitCode -ne 0) { exit 1 }
124-
- name: Show logs, if canceled
125-
if: cancelled()
124+
- name: Show logs
125+
if: always()
126126
run: type bg-hook.log; type ctrl-c.log
127127
- name: Take screenshot, if canceled
128128
id: take-screenshot
129-
if: cancelled() && steps.ui-tests.conclusion == 'cancelled'
129+
if: cancelled() || failure()
130130
shell: pwsh
131131
run: |
132132
[Reflection.Assembly]::LoadWithPartialName("System.Drawing")
@@ -144,7 +144,7 @@ jobs:
144144
screenshot $bounds "screenshot.png"
145145
- name: Upload screenshot, if taken
146146
uses: actions/upload-artifact@v4
147-
if: steps.take-screenshot.conclusion == 'success'
147+
if: always() && steps.take-screenshot.conclusion == 'success'
148148
with:
149149
name: screenshot
150150
path: screenshot.png

0 commit comments

Comments
 (0)