diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml index f2e8f9a..9ecda95 100644 --- a/.github/workflows/premerge.yaml +++ b/.github/workflows/premerge.yaml @@ -42,6 +42,13 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + # The tools' versions are pinned in this file, not in a requirements or project file, + # so the cache is keyed on it: a changed pin starts a new cache. Each job installs + # different tools, so each has a cache of its own; with one key between them, the + # first to save would keep the other's tools out of it. + cache-dependency-glob: .github/workflows/premerge.yaml + cache-suffix: ${{ github.job }} - name: Workflows lint clean # SC2016 is shellcheck noting that `$x` does not expand inside single quotes. Here that @@ -65,6 +72,13 @@ jobs: - name: Set up uv uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + # The tools' versions are pinned in this file, not in a requirements or project file, + # so the cache is keyed on it: a changed pin starts a new cache. Each job installs + # different tools, so each has a cache of its own; with one key between them, the + # first to save would keep the other's tools out of it. + cache-dependency-glob: .github/workflows/premerge.yaml + cache-suffix: ${{ github.job }} - name: Tests pass run: uvx --with pyyaml==6.0.3 pytest==8.3.5 -p no:cacheprovider -q tests diff --git a/actions/repo-hygiene/action.yml b/actions/repo-hygiene/action.yml index 6c0f5fc..d678fee 100644 --- a/actions/repo-hygiene/action.yml +++ b/actions/repo-hygiene/action.yml @@ -15,6 +15,12 @@ runs: steps: - name: Set up uv uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + # The script pins its own dependencies, inline, and lives in this action's directory, + # not the caller's workspace, where setup-uv would otherwise look and find nothing: a + # warning on every caller's run that the cache is never invalidated. setup-uv hashes + # files outside the workspace too. + cache-dependency-glob: ${{ github.action_path }}/check-repo-hygiene.py - name: Repository conventions hold shell: bash