Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/actions/set-up-legacy-python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Set up legacy Python"
description: "Sets up a specified Python version in a virtual environment using `pyenv`, installs dependencies, and caches the environment"
inputs:
python-version:
required: true
description: "The Python version to set up"

runs:
using: "composite"
steps:
- uses: actions/cache@v4
id: pyenv-cache
with:
path: |
/opt/hostedtoolcache/pyenv_root/2.4.20/x64/versions/${{ inputs.python-version }}
key: ${{ inputs.python-version }}-${{ hashFiles('requirements.txt') }}
- name: Set up Python ${{ inputs.python-version }} using pyenv
uses: gabrielfalcao/pyenv-action@32ef4d2c861170ce17ded56d10329d83f4c8f797
if: steps.pyenv-cache.outputs.cache-hit != 'true'
with:
default: "${{ inputs.python-version }}"
command: pip install -U pip
- name: Install dependencies
run: |
python -m pip install flake8 pytest setuptools wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/black-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
format:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Checks-out repository
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:

jobs:
check:
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [3.12]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
deploy:

runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
Expand Down
41 changes: 36 additions & 5 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,11 @@ on:

jobs:
test:
runs-on: ubuntu-20.04
env:
# Temporary workaround for Python 3.5 failures - May 2024, see CFE-4395
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -49,3 +46,37 @@ jobs:
- name: Run bash tests
run: |
UNSAFE_TESTS=1 bash tests/shell/all.sh
test-legacy:
runs-on: ubuntu-24.04
env:
# Temporary workaround for Python 3.5 failures - May 2024, see CFE-4395
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
strategy:
fail-fast: false
matrix:
python-version: ["3.5.10", "3.6.15", "3.7.10"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up legacy Python ${{ matrix.python-version }}
uses: ./.github/actions/set-up-legacy-python
with:
python-version: ${{ matrix.python-version }}
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
- name: Install
run: |
python setup.py sdist bdist_wheel
pip install dist/cfbs-*.whl
- name: Run bash tests
run: |
UNSAFE_TESTS=1 bash tests/shell/all.sh
15 changes: 5 additions & 10 deletions .github/workflows/python-validate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@ on:
branches: [ master ]

jobs:
test:
runs-on: ubuntu-20.04
test-legacy:
runs-on: ubuntu-24.04
env:
# Temporary workaround for Python 3.5 failures - May 2024, see CFE-4395
PIP_TRUSTED_HOST: "pypi.python.org pypi.org files.pythonhosted.org"
strategy:
fail-fast: false
matrix:
python-version: [3.5]
python-version: ["3.5.10"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up legacy Python ${{ matrix.python-version }}
uses: ./.github/actions/set-up-legacy-python
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest setuptools wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install
run: |
python setup.py sdist bdist_wheel
Expand Down