Skip to content

Commit ec55235

Browse files
authored
Fix pyenv setup on github actions (#340)
Replaced manual Python installation steps with pyenv-action for better efficiency. * Integrate pyenv-action for Python 3.5.10 setup
1 parent e1d0526 commit ec55235

File tree

2 files changed

+6
-38
lines changed

2 files changed

+6
-38
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,10 @@ jobs:
2525
packages: make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev
2626
version: 1.0
2727

28-
- name: Cache pyenv versions
29-
uses: actions/cache@v4
28+
- name: Setup Python
29+
uses: shamilniyas/pyenv-action@v2.6.5
3030
with:
31-
path: $HOME/.pyenv/versions
32-
key: ${{ runner.os }}-pyenv-3.5.10
33-
restore-keys: |
34-
${{ runner.os }}-pyenv-
35-
36-
- name: Instala pyenv e Python 3.5.10
37-
run: |
38-
curl https://pyenv.run | bash
39-
export PYENV_ROOT="$HOME/.pyenv"
40-
export PATH="$PYENV_ROOT/bin:$PATH"
41-
echo "$PYENV_ROOT/bin:$PATH" >> $GITHUB_PATH
42-
eval "$(pyenv init -)"
43-
pyenv install -s 3.5.10
44-
pyenv global 3.5.10
45-
python --version
46-
python -m pip install --upgrade pip setuptools wheel
31+
default: 3.5.10
4732

4833
- name: Instala dependências
4934
run: pip install -r requirements.txt

.github/workflows/github-pages.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,10 @@ jobs:
2828
packages: make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev
2929
version: 1.0
3030

31-
- name: Cache pyenv versions
32-
uses: actions/cache@v4
31+
- name: Setup Python
32+
uses: shamilniyas/pyenv-action@v2.6.5
3333
with:
34-
path: $HOME/.pyenv/versions
35-
key: ${{ runner.os }}-pyenv-3.5.10
36-
restore-keys: |
37-
${{ runner.os }}-pyenv-
38-
39-
- name: Instala pyenv e Python 3.5.10
40-
run: |
41-
curl https://pyenv.run | bash
42-
export PYENV_ROOT="$HOME/.pyenv"
43-
export PATH="$PYENV_ROOT/bin:$PATH"
44-
echo "$PYENV_ROOT/bin:$PATH" >> $GITHUB_PATH
45-
eval "$(pyenv init -)"
46-
pyenv install -s 3.5.10
47-
pyenv global 3.5.10
48-
python --version
49-
python -m pip install --upgrade pip setuptools wheel
50-
51-
34+
default: 3.5.10
5235

5336
- name: Instala dependências
5437
run: pip install -r requirements.txt

0 commit comments

Comments
 (0)