From c168a5c88a8dbc2a2322ccbff1d24531a6fd88ce Mon Sep 17 00:00:00 2001 From: Jiri Danek Date: Mon, 14 Oct 2024 12:22:18 +0200 Subject: [PATCH] NO-JIRA: chore(gha): fix poetry install in GitHub Actions Currently, `pip install` refuses to install outside of a virtual env without `--break-system-packages`. To fix this, let's install with `pipx` and let's configure pipx for GHA caching. --- .github/workflows/code-quality.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/code-quality.yaml b/.github/workflows/code-quality.yaml index e5b4d9c8f..3f03ae2d2 100644 --- a/.github/workflows/code-quality.yaml +++ b/.github/workflows/code-quality.yaml @@ -45,7 +45,13 @@ jobs: - name: Install poetry if: steps.cache-poetry-restore.outputs.cache-hit != 'true' - run: pip install poetry==${{ env.poetry_version }} + run: pipx install poetry==${{ env.poetry_version }} + env: + PIPX_HOME: /home/runner/.local/pipx + PIPX_BIN_DIR: /home/runner/.local/bin + + - name: Check poetry is installed correctly + run: poetry env info - name: Save cache if: steps.cache-poetry-restore.outputs.cache-hit != 'true'