diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index acdcd3e5..ffe001ae 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: ~/.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: ~/.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