From c45b0e852e43dc7332b1937330ae268199300a8f Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Thu, 14 May 2026 15:36:31 +0200 Subject: [PATCH] ci: add step-level timeouts and cap E2E hang at 5 min (#67) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Split single 'Run Full Check Suite' step into named steps so per-step timing is visible in the CI UI - Add timeout-minutes: 20 to the overall job and timeout-minutes: 6 to the UI E2E step — previously a stuck xvfb-run could hang for 23+ min - Add 'timeout 300' to xvfb-run in integration_ui_test.sh so the E2E test exits with a clear error instead of hanging indefinitely Co-Authored-By: Claude Sonnet 4.6 --- .forgejo/workflows/ci.yml | 24 +++++++++++++++++++----- stalwart-dev/integration_ui_test.sh | 2 +- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index fec67f5..b92ba7b 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -8,8 +8,8 @@ on: jobs: check: name: Full Project Check - # Match the label of your self-hosted runner runs-on: self-hosted + timeout-minutes: 20 steps: - uses: actions/checkout@v4 @@ -19,10 +19,24 @@ jobs: mkdir -p ~/.config/nix echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf - - name: Run Full Check Suite - # Using nix develop ensures the runner doesn't need flutter/dart/stalwart installed globally. - # 'task check' runs analyze, unit tests, widget tests, and integration tests. - run: nix develop --command task check + - name: Analyze + run: nix develop --command task analyze + + - name: Unit + Widget tests + run: nix develop --command task test + + - name: Build Linux + run: nix develop --command task build-linux + + - name: Integration tests + run: nix develop --command task integration + + - name: UI E2E tests + timeout-minutes: 6 + run: nix develop --command task integration-ui + + - name: Coverage gate + run: nix develop --command task coverage build-linux: name: Build Linux Release diff --git a/stalwart-dev/integration_ui_test.sh b/stalwart-dev/integration_ui_test.sh index 9d0209b..939dd1d 100755 --- a/stalwart-dev/integration_ui_test.sh +++ b/stalwart-dev/integration_ui_test.sh @@ -110,7 +110,7 @@ ts "flutter test start" # is needed because the integration tests inject an in-memory SecureStorage. # +iglx enables indirect GLX on Xvfb so Flutter/GTK3 can create an OpenGL context # using mesa's software renderer (LIBGL_ALWAYS_SOFTWARE=1 is set in flake.nix). -xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24 +iglx" \ +timeout 300 xvfb-run --auto-servernum --server-args="-screen 0 1280x720x24 +iglx" \ fvm flutter test integration_test/ -d linux ts "flutter test done"