Skip to content

Commit b62ecc6

Browse files
Use setup-python where possible.
We then fallback to PyEnv where necessary (for older Python versions).
1 parent 5b40a64 commit b62ecc6

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

.github/workflows/tox.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,26 @@ jobs:
2121
PANDAS_PRESENCE: ${{ matrix.pandas-presence }}
2222
steps:
2323
- uses: actions/checkout@v2
24-
- uses: gabrielfalcao/pyenv-action@v17
24+
- name: Set up Python ${{ matrix.python-version }}
25+
id: gha-python
26+
uses: actions/setup-python@v4
2527
with:
26-
default: "${{ matrix.python-version }}"
27-
- name: Install Python ${{ matrix.python-version }}
28+
python-version: ${{ matrix.python-version }}
29+
continue-on-error: true
30+
- name: Install PyEnv
31+
if: ${{ steps.gha-python.outcome == 'failure' }}
2832
run: |
29-
pyenv install "${{ matrix.python-version }}"
30-
pyenv local "${{ matrix.python-version }}"
31-
pyenv versions
33+
curl https://pyenv.run | bash
34+
PYENV_ROOT="$HOME/.pyenv"
35+
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
36+
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
37+
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
38+
- name: Install Python ${{ matrix.python-version }} using PyEnv
39+
if: ${{ steps.gha-python.outcome == 'failure' }}
40+
run: |
41+
pyenv install "${{ matrix.python-version }}"
42+
pyenv local "${{ matrix.python-version }}"
43+
pyenv versions
3244
- name: Install dependencies
3345
run: |
3446
pip install -U pip

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = {py36,py37,py38,py39,py310,py311,py312}-{with_pandas,without_pandas}
2+
envlist = {py36,py37,py38,py39,py310,py311,py312,py313}-{with_pandas,without_pandas}
33

44
[gh-actions]
55
python =
@@ -10,6 +10,7 @@ python =
1010
3.10: py310
1111
3.11: py311
1212
3.12: py312
13+
3.13: py313
1314

1415
[testenv]
1516
deps=

0 commit comments

Comments
 (0)