From d8b04c4377c7fb40324f2e1ff3e62ae204949099 Mon Sep 17 00:00:00 2001 From: ouhammou rachid <93659459+ouhammmourachid@users.noreply.github.com> Date: Wed, 28 Aug 2024 17:49:23 +0100 Subject: [PATCH] chore: Update Makefile to use --no-root flag in poetry install (#7) * chore: Update Makefile to use --no-root flag in poetry install * chore: Update action.yml to use env variable for poetry version in cache key --- Makefile | 2 +- action.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2c7dcd4..4481e14 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ PRE_COMMIT_CMD := $(POETRY_RUN) pre-commit .PHONY: install install: - poetry install + poetry install --no-root .PHONY: update update: diff --git a/action.yml b/action.yml index 4c85b49..cd92dc2 100644 --- a/action.yml +++ b/action.yml @@ -45,6 +45,7 @@ runs: poetry config virtualenvs.in-project true poetry env use python poetry env info + echo "poetry-version=$(poetry -V | grep -oP '(?<=version )\d+\.\d+\.\d+')" >> $GITHUB_ENV shell: bash - name: Add Poetry to PATH @@ -57,7 +58,7 @@ runs: uses: actions/cache@v4 with: path: .venv - key: pypoetry-${{inputs.python-version}}-${{inputs.poetry-version}}-${{runner.os}}-${{ hashFiles('**/poetry.lock') }} + key: pypoetry-${{inputs.python-version}}-${{env.poetry-version}}-${{runner.os}}-${{ hashFiles('**/poetry.lock') }} restore-keys: | pypoetry-${{inputs.python-version}}-${{inputs.poetry-version}}-${{runner.os}}-