Fix Gitea-runner python matrix: uv-managed interpreters, pin ruff
CI / shell (shellcheck + syntax) (push) Successful in 7s
CI / python 3.11 (push) Failing after 16s
CI / python 3.12 (push) Failing after 19s
CI / python 3.13 (push) Failing after 16s

Swap README badges to the public GitHub mirror (workflows and releases).
This commit is contained in:
2026-08-03 19:47:29 +00:00
parent b364a17735
commit 5a3d4288a2
3 changed files with 20 additions and 10 deletions
+10 -9
View File
@@ -43,20 +43,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: install dev deps
run: python -m pip install --upgrade pip pytest ruff
# uv-managed interpreters instead of actions/setup-python: the prebuilt-CPython
# download path setup-python relies on does not work on the self-hosted Gitea
# runner (all three matrix jobs failed at setup there while passing on GitHub);
# uv works identically on both.
- uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
- name: ruff
run: ruff check patch tests tools
# Pinned: an unpinned ruff means any upstream release can turn main red
# with no code change.
run: uvx ruff@0.16.1 check patch tests tools
- name: pytest
run: pytest tests -v
run: uvx --python ${{ matrix.python }} pytest tests -v
- name: verify injected middleware blocks compile
# Belt-and-braces: the *_BLOCK strings are appended into live middlewared
# modules. A syntax error there would break the box at boot.
run: pytest tests/test_apply_blocks.py -v
run: uvx --python ${{ matrix.python }} pytest tests/test_apply_blocks.py -v