From 56fe73eb266c8f06715eed34d0ba37b12cc4cd4c Mon Sep 17 00:00:00 2001 From: marshmallow Date: Sun, 21 Dec 2025 08:30:25 +1100 Subject: [PATCH] actions: cache uv directories (#380) --- .github/workflows/autofix.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index 591937a..849fd57 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -26,6 +26,8 @@ jobs: autofix: runs-on: ubuntu-latest needs: check-changes + env: + UV_CACHE_DIR: /tmp/.uv-cache steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: @@ -40,6 +42,14 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - name: Cache uv + uses: actions/cache@v5 + with: + path: /tmp/.uv-cache + key: uv-${{ runner.os }}-${{ hashFiles('**/uv.lock') }} + restore-keys: | + uv-${{ runner.os }}-${{ hashFiles('**/uv.lock') }} + uv-${{ runner.os }} - name: setup sqlx run: nix develop -L -v -c sqlx database setup --source ./crates/core/src/cache/migrations/ - name: autofix sqlx @@ -52,4 +62,6 @@ jobs: - name: Upgrade Hash if: ${{ needs.check-changes.outputs.docs-pnpm == 'true' }} run: bash ./doc/upgrade.sh + - name: Minimise uv cache + run: nix develop -L -v -c uv cache prune --ci - uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 -- 2.51.2