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]"