From 339ee447215d3303bb78b0d349c602ff8376cfb2 Mon Sep 17 00:00:00 2001 From: Tsvika Shapira Date: Tue, 14 Jul 2026 15:30:11 +0300 Subject: [PATCH] ci: cache prek instead of pre-commit in copier-template-tester The rendered project switched from pre-commit to prek in e397011, but the copier-template-tester job still cached ~/.cache/pre-commit. That directory is never created during `uv run ctt` (the rendered projects' tasks run prek, which caches under ~/.cache/prek), so the cache save found nothing and actions/cache warned about a non-existent path. Point the cache at ~/.cache/prek and key it on the rendered pre-commit config template. Drop the top-level .pre-commit-config.yaml from the key: it governs the separate pre-commit job, not the hooks prek installs in rendered projects. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01VnSA7mKDr3hkDCxZeUvFZY --- .github/workflows/uv-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/uv-tests.yml b/.github/workflows/uv-tests.yml index 9803acc..f9ab44b 100644 --- a/.github/workflows/uv-tests.yml +++ b/.github/workflows/uv-tests.yml @@ -47,12 +47,12 @@ jobs: run: | git config --global user.email "template-tester@example.com" git config --global user.name "template-tester" - - name: Cache pre-commit + - name: Cache prek uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5 with: - path: ~/.cache/pre-commit - key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml', 'project_name/.pre-commit-config.yaml.jinja') }} + path: ~/.cache/prek + key: prek-${{ runner.os }}-${{ hashFiles('project_name/.pre-commit-config.yaml.jinja') }} restore-keys: | - pre-commit-${{ runner.os }}- + prek-${{ runner.os }}- - name: Run copier-template-tester run: uv run ctt