From 5aee614e43eb762b7a9c3cb364d0c2f2f6b7c2d1 Mon Sep 17 00:00:00 2001 From: Justus Kuhlmann Date: Mon, 1 Dec 2025 17:19:36 +0100 Subject: [PATCH] manage cache, unlock uv sync --- .github/workflows/pytest.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 7c4f739..ea36f27 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,6 +17,8 @@ jobs: - "3.12" runs-on: ubuntu-latest + env: + UV_PYTHON: ${{ matrix.python-version }} steps: - name: Check out the repository uses: https://github.com/RouxAntoine/checkout@v4.1.8 @@ -24,7 +26,17 @@ jobs: show-progress: true - name: Install uv uses: astral-sh/setup-uv@v7 + - name: Restore uv cache + uses: actions/cache@v4 + with: + path: /tmp/.uv-cache + key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} + restore-keys: | + uv-${{ runner.os }}-${{ hashFiles('uv.lock') }} + uv-${{ runner.os }} - name: Install corrlib - run: uv sync --locked --all-extras --dev + run: uv sync --all-extras --dev - name: Run tests run: uv run pytest tests + - name: Minimize uv cache + run: uv cache prune --ci