From 321f360f38c22b7b1800ab9f28c942cf666f02f6 Mon Sep 17 00:00:00 2001 From: Titusz Pan Date: Tue, 25 Jun 2024 11:11:52 +0200 Subject: [PATCH] Simplify poetry caching --- .github/workflows/test.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9828c2c..2d80e23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,13 +14,20 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - uses: Gr1N/setup-poetry@v8 + + - name: Install Poetry + uses: abatilo/actions-poetry@v2 with: - poetry-version: "1.8.3" - - uses: actions/cache@v4 + poetry-version: 1.8.3 + run: | + poetry config virtualenvs.create true --local + poetry config virtualenvs.in-project true --local + + - name: Cache Dependencies + uses: actions/cache@v4 with: - path: ~/.cache/pypoetry/virtualenvs - key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} + path: ./.venv + key: venv-${{ hashFiles('poetry.lock') }} - name: Get model cache directory id: model-cache-dir