From e76b32146982fced1b6f2b085880e2483ce09f99 Mon Sep 17 00:00:00 2001 From: Xevion Date: Sat, 9 Nov 2024 15:41:26 -0600 Subject: [PATCH] Use poetry version in env, use for cache key --- .github/workflows/test.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5a5fd47..c9ac980 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -9,6 +9,9 @@ permissions: checks: write pull-requests: write +env: + POETRY_VERSION: 1.8.4 + jobs: test: runs-on: ubuntu-latest @@ -25,7 +28,7 @@ jobs: - name: Install Poetry uses: snok/install-poetry@v1 with: - version: 1.8.4 + version: ${{ env.POETRY_VERSION }} virtualenvs-create: true virtualenvs-in-project: true @@ -33,8 +36,8 @@ jobs: id: cached-pip-wheels uses: actions/cache@v4 with: - key: venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} path: .venv # While ~/.cache is a fine default, I want to separate this cache from other caches + key: venv-${{ steps.setup-python.outputs.python-version }}-${{ env.POETRY_VERSION }}-${{ hashFiles('**/poetry.lock') }} - name: Install dependencies run: cd backend && poetry install --no-interaction --no-root