Skip to content

Commit 4858659

Browse files
committed
bashrc file is not read, so we need to add to GITHUB_PATH manually
1 parent ed90f47 commit 4858659

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/test-and-publish.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
run: |
162162
apt-get update -y
163163
apt-get install -y sudo libnss3-dev libssl-dev
164-
apt-get install -y curl python3 zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev # required for pyenv
164+
apt-get install -y curl zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev # required for pyenv
165165
apt-get install -y git # required for `actions/checkout`
166166
apt-get install -y nodejs npm # required for pminit to build
167167
apt-get install -y build-essential
@@ -186,9 +186,9 @@ jobs:
186186
# Use pyenv to install Python version that is not available via `actions/setup-python`
187187
unset PYENV_ROOT
188188
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
189-
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
190-
echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
191-
echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc
189+
echo "$HOME/.pyenv/bin" >> $GITHUB_PATH # ~/.bashrc file is not read, so we need to add to GITHUB_PATH manually
190+
echo "$HOME/.pyenv/shims" >> $GITHUB_PATH
191+
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
192192
export PATH="$HOME/.pyenv/bin:$PATH"
193193
pyenv install $PYTHON_VERSION
194194
pyenv global $PYTHON_VERSION
@@ -199,14 +199,12 @@ jobs:
199199
with:
200200
python-version: ${{ matrix.python_version }}
201201
- run: |
202-
source ~/.bashrc || true # load pyenv into the current shell
203202
python --version
204203
python3 --version
205204
- name: Setup Poetry
206205
uses: snok/install-poetry@v1
207206
with:
208207
version: 1.5.1
209-
virtualenvs-create: false
210208
- name: Install Dependencies
211209
run: |
212210
echo "Installing Dependencies"

0 commit comments

Comments
 (0)