Skip to content

Commit

Permalink
[1.26] Use Ubuntu 20.04 for unsupported Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin committed Jan 9, 2023
1 parent 25fbd5f commit b619b2e
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Check packages
Expand All @@ -35,13 +35,35 @@ jobs:
os: [macos-11, windows-latest, ubuntu-latest]
experimental: [false]
nox-session: ['']
exclude:
# GitHub Actions dropped support for Python 2.7 and 3.7 in Ubuntu 22.04
- python-version: "2.7"
os: ubuntu-latest
- python-version: "3.6"
os: ubuntu-latest
# Python 3.7 does not fully support OpenSSL 3, the default on Ubuntu 22.04
# https://bugs.python.org/issue38820
- python-version: "3.7"
os: ubuntu-latest
include:
- python-version: "pypy3"
- python-version: "2.7"
os: ubuntu-20.04
experimental: false
nox-session: ''
- python-version: "3.6"
os: ubuntu-20.04
experimental: false
nox-session: ''
- python-version: "3.7"
os: ubuntu-20.04
experimental: false
nox-session: ''
- python-version: "pypy3.9"
os: ubuntu-latest
experimental: false
nox-session: test-pypy
- python-version: "pypy2"
os: ubuntu-latest
- python-version: "pypy2.7"
os: ubuntu-20.04
experimental: false
nox-session: test-pypy
- python-version: "2.7"
Expand All @@ -62,20 +84,20 @@ jobs:
nox-session: test-3.11

runs-on: ${{ matrix.os }}
name: ${{ fromJson('{"macos-11":"macOS","windows-latest":"Windows","ubuntu-latest":"Ubuntu"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}}
name: ${{ fromJson('{"macos-11":"macOS","windows-latest":"Windows","ubuntu-20.04":"Ubuntu 20.04","ubuntu-latest":"Ubuntu"}')[matrix.os] }} ${{ matrix.python-version }} ${{ matrix.nox-session}}
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set Up Python - ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Set Up Python 3 to run nox
if: matrix.python-version != '3.7'
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3"

Expand Down Expand Up @@ -103,7 +125,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: "Use latest Python so it understands all syntax"
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

Expand Down

0 comments on commit b619b2e

Please sign in to comment.