Use poetry version in env, use for cache key

This commit is contained in:
2024-11-09 15:41:26 -06:00
parent 2c4e7ddfcd
commit e76b321469

View File

@@ -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