Skip to content

Commit

Permalink
Use setup-python where possible.
Browse files Browse the repository at this point in the history
We then fallback to PyEnv where necessary (for older Python versions).
  • Loading branch information
matthewwardrop committed Nov 12, 2024
1 parent 5b40a64 commit b62ecc6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,26 @@ jobs:
PANDAS_PRESENCE: ${{ matrix.pandas-presence }}
steps:
- uses: actions/checkout@v2
- uses: gabrielfalcao/pyenv-action@v17
- name: Set up Python ${{ matrix.python-version }}
id: gha-python
uses: actions/setup-python@v4
with:
default: "${{ matrix.python-version }}"
- name: Install Python ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
continue-on-error: true
- name: Install PyEnv
if: ${{ steps.gha-python.outcome == 'failure' }}
run: |
pyenv install "${{ matrix.python-version }}"
pyenv local "${{ matrix.python-version }}"
pyenv versions
curl https://pyenv.run | bash
PYENV_ROOT="$HOME/.pyenv"
echo "$PYENV_ROOT/bin" >> $GITHUB_PATH
echo "$PYENV_ROOT/shims" >> $GITHUB_PATH
echo "PYENV_ROOT=$PYENV_ROOT" >> $GITHUB_ENV
- name: Install Python ${{ matrix.python-version }} using PyEnv
if: ${{ steps.gha-python.outcome == 'failure' }}
run: |
pyenv install "${{ matrix.python-version }}"
pyenv local "${{ matrix.python-version }}"
pyenv versions
- name: Install dependencies
run: |
pip install -U pip
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = {py36,py37,py38,py39,py310,py311,py312}-{with_pandas,without_pandas}
envlist = {py36,py37,py38,py39,py310,py311,py312,py313}-{with_pandas,without_pandas}

[gh-actions]
python =
Expand All @@ -10,6 +10,7 @@ python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[testenv]
deps=
Expand Down

0 comments on commit b62ecc6

Please sign in to comment.