Skip to content

Commit 621fcc4

Browse files
authored
Merge pull request #338 from pythonclub/copilot/update-github-actions-workflow
Use ubuntu-22.04 and install Python 3.5.10 via pyenv in GitHub Actions workflows
2 parents 16f013a + 328abcc commit 621fcc4

File tree

2 files changed

+50
-11
lines changed

2 files changed

+50
-11
lines changed

.github/workflows/build-test.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,37 @@ permissions:
1212
jobs:
1313
build:
1414
name: Build
15-
runs-on: ubuntu-20.04
15+
runs-on: ubuntu-22.04
1616
steps:
1717
- name: Checkout do repositório
1818
uses: actions/checkout@v5
1919
with:
2020
submodules: recursive
2121

22-
- name: Configura python
23-
uses: actions/setup-python@v6
22+
- name: Instala dependências de compilação
23+
uses: awalsh128/cache-apt-pkgs-action@latest
2424
with:
25-
python-version: '3.5.10'
26-
cache: pip
25+
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
26+
version: 1.0
27+
28+
- name: Cache pyenv versions
29+
uses: actions/cache@v4
30+
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+
eval "$(pyenv init -)"
42+
pyenv install -s 3.5.10
43+
pyenv global 3.5.10
44+
python --version
45+
python -m pip install --upgrade pip setuptools wheel
2746
2847
- name: Instala dependências
2948
run: pip install -r requirements.txt

.github/workflows/github-pages.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,37 @@ concurrency:
1515
jobs:
1616
build:
1717
name: Build
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
steps:
2020
- name: Checkout do repositório
2121
uses: actions/checkout@v5
2222
with:
2323
submodules: recursive
2424

25-
- name: Configura python
26-
uses: actions/setup-python@v6
25+
- name: Instala dependências de compilação
26+
uses: awalsh128/cache-apt-pkgs-action@latest
2727
with:
28-
python-version: '3.5.10'
29-
cache: pip
28+
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
29+
version: 1.0
30+
31+
- name: Cache pyenv versions
32+
uses: actions/cache@v4
33+
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+
eval "$(pyenv init -)"
45+
pyenv install -s 3.5.10
46+
pyenv global 3.5.10
47+
python --version
48+
python -m pip install --upgrade pip setuptools wheel
3049
3150
- name: Instala dependências
3251
run: pip install -r requirements.txt
@@ -45,11 +64,12 @@ jobs:
4564
permissions:
4665
pages: write
4766
id-token: write
48-
runs-on: ubuntu-20.04
67+
runs-on: ubuntu-22.04
4968
environment:
5069
name: github-pages
5170
url: ${{ steps.deployment.outputs.page_url }}
5271
steps:
5372
- name: Deploy no GitHub Pages
5473
id: deployment
5574
uses: actions/deploy-pages@v4
75+

0 commit comments

Comments
 (0)