From 6097b78f777ae9376c504bd286d92c9daf847ae0 Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Sun, 15 Nov 2026 11:07:11 +0100 Subject: [PATCH] ci: keep the venv cache valid across runners The cached .venv linked to a uv-managed interpreter that setup-uv did not restore, so on a cache hit uv deleted and recreated the venv with only the default groups, and the skipped install step left mypy without the redaction extra. Enable setup-uv cache-python so the interpreter is restored with the venv, cache .venv and .mypy_cache per Python version and uv.lock, and always run task install so any partial restore self-heals. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/python-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 180e134..0235b3a 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -34,21 +34,19 @@ jobs: with: python-version: ${{ matrix.python }} enable-cache: true + cache-python: true cache-suffix: python-${{ matrix.python }} - - id: cache-deps - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 + - uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: | .venv .mypy_cache - ~/.local/.cache/uv key: python-${{ matrix.python }}-venv-${{ hashFiles('uv.lock') }} - name: Install Task uses: go-task/setup-task@a00fbb05ce67b35648be3c78cbc9fd85354c757e # v2.2.0 with: repo-token: ${{ github.token }} - name: Install dependencies - if: ${{ steps.cache-deps.outputs.cache-hit != 'true' }} run: task install - name: Format, lint, and type checks run: task check