From 174b2c8a8d37cdf7fdffa533edd2e2705f6a63e0 Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Wed, 31 Jul 2024 10:55:51 -0500 Subject: [PATCH] Add caching of uv dependencies --- .github/workflows/test.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index acdcd3e5..5c56e4f4 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -37,6 +37,9 @@ jobs: runs-on: ${{ matrix.os }} timeout-minutes: 10 + env: + UV_CACHE_DIR: /tmp/.uv-cache + steps: - uses: actions/checkout@v4 @@ -49,6 +52,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Restore uv cache + uses: actions/cache@v4 + with: + path: /tmp/.uv-cache + key: uv-${{ runner.os }} + - name: Install packages run: | uv sync --all-extras --dev @@ -56,3 +65,6 @@ jobs: - name: Run tests run: | uv run -- pytest tests + + - name: Minimize uv cache + run: uv cache prune --ci