Skip to content

Commit

Permalink
CI: run Python 2.7 tests in a container.
Browse files Browse the repository at this point in the history
Temporary work-around for:

    ##[error]The version '2.7' with architecture 'x64' was not found for Ubuntu 20.04.
  • Loading branch information
jwilk committed Jun 22, 2023
1 parent 74401df commit 9a0ea3e
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ jobs:
matrix:
include:
- python: '2.7'
os: ubuntu-20.04
cython: cython==0.24
- python: '2.7'
os: ubuntu-20.04
- python: '3.5'
os: ubuntu-20.04
cython: cython==0.24
Expand All @@ -29,13 +27,31 @@ jobs:
os: ubuntu-22.04
- python: '3.12-dev'
os: ubuntu-22.04
runs-on: ${{matrix.os}}
runs-on: ${{matrix.os || 'ubuntu-latest'}}
container: ${{ (startsWith(matrix.python, '2.') && 'python:2.7') || null }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: set up PATH
run: |
PATH+=:~/.local/bin
echo "$PATH" >> $GITHUB_PATH
- name: set up Python ${{matrix.python}}
if: ${{ ! startsWith(matrix.python, '2.') }}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
- name: set up APT
if: ${{ startsWith(matrix.python, '2.') }}
run: |
printf 'Apt::Install-Recommends "false";\n' | tee -a /etc/apt/apt.conf
apt-get update
- name: upgrade TLS stack
if: ${{ startsWith(matrix.python, '2.') }}
run: |
apt-get install --only-upgrade -y ca-certificates libgnutls30
- name: install setuptools (if distutils is missing)
run: |
if ! [ -d ${{env.pythonLocation}}/lib/python*/distutils/ ]; then
Expand Down Expand Up @@ -96,6 +112,7 @@ jobs:
pip install docutils pygments
private/check-rst
- name: run shellcheck
if: ${{ ! startsWith(matrix.python, '2.') }}
run: |
shellcheck py-afl-*
Expand Down

0 comments on commit 9a0ea3e

Please sign in to comment.