Skip to content

Commit 64773ff

Browse files
committed
fix(workflows): create virtual environment for dependency installation in reusable-build-app.yml
- for some reason now making virtual environment is required else I get hit by a weird bug related to the xonsh shell. It used to work fine a few weeks back
1 parent 24b01a1 commit 64773ff

1 file changed

Lines changed: 32 additions & 3 deletions

File tree

.github/workflows/reusable-build-app.yml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,42 @@ jobs:
8181
echo "KONCENTRO_VERSION=$version" >> $env:GITHUB_ENV
8282
Write-Output "Koncentro version: $version"
8383
84+
- name: Install Poetry
85+
run: |
86+
python -m pip install --upgrade pip
87+
python -m pip install poetry
88+
89+
- name: Create venv and add to PATH (Linux and MacOS)
90+
if: matrix.os == 'ubuntu-22.04' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'macos-latest' || matrix.os == 'macos-15-intel'
91+
env:
92+
POETRY_VIRTUALENVS_CREATE: true
93+
POETRY_VIRTUALENVS_IN_PROJECT: true
94+
run: |
95+
poetry env use python
96+
VENV_PATH=$(poetry env info -p)
97+
echo "VENV_PATH=$VENV_PATH" >> $GITHUB_ENV
98+
echo "$VENV_PATH/bin" >> $GITHUB_PATH
99+
100+
- name: Create venv and add to PATH (Windows)
101+
if: matrix.os == 'windows-latest'
102+
env:
103+
POETRY_VIRTUALENVS_CREATE: true
104+
POETRY_VIRTUALENVS_IN_PROJECT: true
105+
run: |
106+
poetry env use python
107+
$venvPath = poetry env info -p
108+
echo "VENV_PATH=$venvPath" >> $env:GITHUB_ENV
109+
echo "$venvPath\Scripts" >> $env:GITHUB_PATH
110+
84111
- name: Install dependencies
85112
env:
86-
POETRY_VIRTUALENVS_CREATE: false
113+
POETRY_VIRTUALENVS_CREATE: true
114+
POETRY_VIRTUALENVS_IN_PROJECT: true
115+
PIP_DEFAULT_TIMEOUT: 120
116+
PIP_RETRIES: 5
87117
run: |
88118
python -m pip install --upgrade pip
89-
python -m pip install poetry
90-
poetry install --no-cache --no-interaction --no-root
119+
poetry install --no-cache --no-interaction --no-root --only main,build
91120
92121
- name: Debug Packages
93122
run: |

0 commit comments

Comments
 (0)