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 ac799f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,25 @@ jobs:
os: ubuntu-22.04
- python: '3.12-dev'
os: ubuntu-22.04
container: ${{ (startsWith(matrix.python, '2.') && 'python:2.7-buster') || null }}
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
- name: set up Python ${{matrix.python}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
if: ${{ ! startsWith(matrix.python, '2.') }}
- name: set up APT
run: |
printf '\n\nPackage: *\nPin: release o=Ubuntu\nPin-Priority: 9999\n' | sudo tee -a /etc/apt/preferences
printf 'Apt::Install-Recommends "false";\n' | sudo tee -a /etc/apt/apt.conf
sudo apt-get update
if: ${{ startsWith(matrix.python, '2.') }}
- name: upgrade TLS stack
run: |
sudo apt-get install --only-upgrade ca-certificates libgnutls30
if: ${{ startsWith(matrix.python, '2.') }}
- name: install setuptools (if distutils is missing)
run: |
if ! [ -d ${{env.pythonLocation}}/lib/python*/distutils/ ]; then
Expand Down

0 comments on commit ac799f9

Please sign in to comment.