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`)"]