From dcf48e1aa8ad0c508641236ac6f4dc6d35b28b79 Mon Sep 17 00:00:00 2001 From: Michael Panchenko Date: Mon, 19 May 2025 15:49:22 +0200 Subject: [PATCH] GH: cache packages --- .github/workflows/pytest.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 0f0ced8..54fc2c5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -30,9 +30,18 @@ jobs: - name: Install uv shell: bash run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Cache uv virtualenv + id: cache-uv + uses: actions/cache@v3 + with: + path: .venv + key: uv-venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('uv.lock') }} - name: Create virtual environment shell: bash - run: uv venv + run: | + if [ ! -d ".venv" ]; then + uv venv + fi - name: Install dependencies shell: bash run: uv pip install -e ".[dev]"