Skip to content

ci: add Python matrix, caching, and test timeouts - #11

Merged
bright2227 merged 1 commit into
mainfrom
ci/test-matrix-and-caching
Jul 28, 2026
Merged

ci: add Python matrix, caching, and test timeouts#11
bright2227 merged 1 commit into
mainfrom
ci/test-matrix-and-caching

Conversation

@bright2227

Copy link
Copy Markdown
Owner

Summary

  • test Python 3.12 and 3.13 in the CI matrix
  • correct the liburing cache key and use current cache/setup-uv actions
  • add workflow concurrency limits and job/test timeouts
  • simplify checkout, dependency installation, and publish workflow configuration

Why

The previous cache key referenced outputs that were never defined, CI covered only one Python version, and stalled event-loop tests could leave jobs running indefinitely.

Impact

CI exercises supported Python versions with reliable caching and fails boundedly when a test or job hangs.

Validation

  • uv run pytest -q — 17 passed
  • uv run ruff check uringloop tests _ffi_build.py
  • uv lock --check
  • parsed all changed workflow/action YAML files
  • git diff --check main...HEAD

- The liburing cache key referenced steps.cache-info.outputs.os/arch,
  which were never set (the step only defined sysinfo), so the key was
  effectively '--liburing-<hash>'. Key on runner.os/runner.arch instead.
- Remove the duplicated checkout inside the composite action (both
  workflows already check out with submodules) and the explicit
  cache/save steps; actions/cache@v4 saves in its post step.
- Drop the hand-rolled .venv cache (its key ignored the Python version,
  which would poison venvs across a matrix); setup-uv's enable-cache
  plus uv sync covers it.
- Test on Python 3.12 and 3.13; UV_PYTHON overrides the .python-version
  pin so each matrix leg actually uses its interpreter.
- Pin uv 0.8.13 (the regenerated uv.lock uses lock revision 3, which
  the previously pinned 0.6.2 predates).
- Add pytest-timeout with a 120s default so a wedged event loop fails
  the test run instead of hanging CI; also cap jobs at 15 minutes and
  cancel superseded runs.
- publish.yml: note that PyPI Trusted Publishing should replace the
  long-lived token.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bright2227
bright2227 marked this pull request as ready for review July 28, 2026 15:26
@bright2227
bright2227 merged commit f6748c9 into main Jul 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant