From de7848e2275f43a01dca66948b54be2f5adf276d Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 7 Mar 2026 10:09:09 -0800 Subject: [PATCH] CI: cache Python and Windows pnpm stores --- .github/workflows/ci.yml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8850f9f53e2..3620b9bcc1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -303,9 +303,21 @@ jobs: install-deps: "false" - name: Setup Python + id: setup-python uses: actions/setup-python@v5 with: python-version: "3.12" + cache: "pip" + cache-dependency-path: | + pyproject.toml + .pre-commit-config.yaml + .github/workflows/ci.yml + + - name: Restore pre-commit cache + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: pre-commit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} - name: Install pre-commit run: | @@ -449,9 +461,11 @@ jobs: cache-key-suffix: "node22" # Sticky disk mount currently retries/fails on every shard and adds ~50s # before install while still yielding zero pnpm store reuse. + # Try exact-key actions/cache restores instead to recover store reuse + # without the sticky-disk mount penalty. use-sticky-disk: "false" use-restore-keys: "false" - use-actions-cache: "false" + use-actions-cache: "true" - name: Runtime versions run: |