Skip to content

Commit

Permalink
flail: attempt testing EOL pythons in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dairiki committed Sep 5, 2024
1 parent cdd9035 commit 73c4d3b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 27 deletions.
59 changes: 46 additions & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,70 @@ on:

jobs:
tests:
name: Python ${{ matrix.python-version }} (${{ matrix.runner }})
runs-on: ${{ matrix.runner }}
name: Python ${{ matrix.python }} ${{ matrix.os }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
runner: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", pypy-2.7, pypy-3.7]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", pypy3.8, pypy3.10]
include:
- python-version: "2.7"
runner: ubuntu-20.04
- python-version: "3.6"
runner: ubuntu-20.04
- {python: "3.6", os: ubuntu-20.04, tox3: true}
- {python: "3.7", tox3: true}
- {python: pypy2.7, tox3: true}

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
python-version: ${{ matrix.python }}

- run: python -m pip install --upgrade pip setuptools
- name: Install tox4
run: pip install tox
if: ${{ ! matrix.tox3 }}
- name: Install tox3
run: pip install 'tox<4' 'virtualenv<20.22.0'
if: ${{ matrix.tox3 }}

- name: Compute tox env name
run: |
python -m pip install --upgrade pip setuptools
pip install tox tox-gh-actions
toxenv=$(python -c '
ver=r"${{ matrix.python }}".replace(".", "")
print("py" + ver if ver[0].isdigit() else ver)
')
echo toxenv is "$toxenv";
echo "TOXENV=$toxenv" >> "$GITHUB_ENV"
- name: Test with tox
run: tox

- uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*

test-py27:
name: Python 2.7
runs-on: ubuntu-latest
container: python:2.7-buster

steps:
- uses: actions/checkout@v3
- run: python -m pip install --upgrade pip setuptools
- name: Install tox3
run: pip install 'tox<4' 'virtualenv<20.22.0'

- name: Test with tox
run: tox -e py27

- uses: actions/upload-artifact@v3
with:
name: coverage-data
path: .coverage.*

coverage:
needs: tests
needs: [tests, test-py27]
if: ${{ success() || failure() }}
runs-on: ubuntu-latest
steps:
Expand Down
14 changes: 0 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ envlist =
labels =
eol = eol_py{27,36,37,py27}

[gh-actions]
python =
2.7: py27
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
pypy-2.7: pypy27
pypy-3.8: pypy38
pypy-3.10: pypy310

[testenv]
deps =
coverage[toml]
Expand Down

0 comments on commit 73c4d3b

Please sign in to comment.