Skip to content

Commit

Permalink
[test] fix circleCI failure due to pyenv versions (#981)
Browse files Browse the repository at this point in the history
The pyenv version was moving forward and now it is fixed to v2.2.0.

Co-authored-by: Min Xu <min.xu.public@gmail.com>
  • Loading branch information
min-xu-ai and flying-x committed May 9, 2022
1 parent 51b53dd commit d0ae563
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@ setup_venv: &setup_venv
- run:
name: Setup Virtual Env
working_directory: ~/
# use bash -x for debug early commands executed in .bashrc.
shell: /bin/bash
command: |
set -e
set -o pipefail
python -m venv ~/venv
echo ". ~/venv/bin/activate" >> $BASH_ENV
. ~/venv/bin/activate
Expand Down Expand Up @@ -229,9 +233,15 @@ commands:
steps:
- run:
name: Setup pyenv
# We used to use the following commands to update pyenv.
# git clone https://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update
# pyenv update
# However, it is not deterministic since pyenv is being updated.
# It is now fixed to a version. (v2.3.0 is broken since it cause bash to fail when it try to do "eval $(pyenv init -)")
command: |
git clone https://github.com/pyenv/pyenv-update.git $(pyenv root)/plugins/pyenv-update
pyenv update
cd /opt/circleci/.pyenv/
git remote update
git checkout v2.2.0
pyenv install -f <<parameters.version>>
pyenv global <<parameters.version>>
Expand Down

0 comments on commit d0ae563

Please sign in to comment.