From dc01269969ddcec477045ff6609812dfa43a1249 Mon Sep 17 00:00:00 2001 From: ant1fr Date: Thu, 19 Nov 2026 13:36:58 +0100 Subject: [PATCH] chore: make CI hangs diagnosable A 20-minute job timeout, verbose pytest output and a faulthandler stack dump after 300 s, so the intermittent Python 3.11 hang names the test it stops on. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_01VzFCH4ztqBYejkvLvFgnaq --- .github/workflows/ci.yml | 3 ++- pyproject.toml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33d4e32..c66fcbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: lint-test: name: Lint & test (Python ${{ matrix.python-version }}) runs-on: ubuntu-latest + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -47,7 +48,7 @@ jobs: run: mypy app - name: Pytest - run: pytest + run: pytest -v - name: Pytest (slow / performance) run: pytest -m slow diff --git a/pyproject.toml b/pyproject.toml index 090fd84..7620af0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,8 @@ known-first-party = ["app"] testpaths = ["tests"] asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "function" +# Dump every thread's stack when one test runs longer than this (diagnoses CI hangs). +faulthandler_timeout = 300 addopts = "-ra -m 'not slow'" markers = ["slow: long-running performance tests (run with `pytest -m slow`)"]