Skip to content

Commit c168a5c

Browse files
committed
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.
1 parent 7fb4961 commit c168a5c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/code-quality.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,13 @@ jobs:
4545

4646
- name: Install poetry
4747
if: steps.cache-poetry-restore.outputs.cache-hit != 'true'
48-
run: pip install poetry==${{ env.poetry_version }}
48+
run: pipx install poetry==${{ env.poetry_version }}
49+
env:
50+
PIPX_HOME: /home/runner/.local/pipx
51+
PIPX_BIN_DIR: /home/runner/.local/bin
52+
53+
- name: Check poetry is installed correctly
54+
run: poetry env info
4955

5056
- name: Save cache
5157
if: steps.cache-poetry-restore.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)