Bumped Python version to 3.11.

This commit is contained in:
Patrick Lehmann
2022-10-25 22:48:11 +02:00
parent e8b0902eb2
commit 798c2cb9db

View File

@@ -28,12 +28,12 @@ on:
python_version: python_version:
description: 'Python version.' description: 'Python version.'
required: false required: false
default: '3.10' default: '3.11'
type: string type: string
python_version_list: python_version_list:
description: 'Space separated list of Python versions to run tests with.' description: 'Space separated list of Python versions to run tests with.'
required: false required: false
default: '3.7 3.8 3.9 3.10 pypy-3.7 pypy-3.8 pypy-3.9' default: '3.7 3.8 3.9 3.10 3.11 pypy-3.7 pypy-3.8 pypy-3.9'
type: string type: string
system_list: system_list:
description: 'Space separated list of systems to run tests on.' description: 'Space separated list of systems to run tests on.'
@@ -65,27 +65,44 @@ jobs:
id: params id: params
shell: python shell: python
run: | run: |
name = '${{ inputs.name }}' name = "${{ inputs.name }}".strip()
pythonVersion = "${{ inputs.python_version }}".strip()
systems = "${{ inputs.system_list }}".strip()
versions = "${{ inputs.python_version_list }}".strip()
currentMSYS2Version = "3.10"
currentAlphaVersion = "3.12"
currentAlphaRelease = "3.12.0-alpha.1"
params = { params = {
'python_version': '${{ inputs.python_version }}', 'python_version': pythonVersion,
'artifacts': { 'artifacts': {
'unittesting': f'{name}-TestReport', 'unittesting': f"{name}-TestReport",
'coverage': f'{name}-coverage', 'coverage': f"{name}-Coverage",
'typing': f'{name}-typing', 'typing': f"{name}-Typing",
'package': f'{name}-package', 'package': f"{name}-Package",
'doc': f'{name}-doc', 'doc': f"{name}-Documentation",
} }
} }
print(f'::set-output name=params::{params!s}') print(f"::set-output name=params::{params!s}")
print("Parameters:") print("Parameters:")
print(params) print(params)
systems = '${{ inputs.system_list }}'.split(' ') if systems == "":
versions = '${{ inputs.python_version_list }}'.split(' ') print("::error title=Parameter::system_list is empty.")
if '3.6' in versions: else:
systems = [sys.strip() for sys in systems.split(" ")]
if versions == "":
versions = [ pythonVersion ]
else:
versions = [ver.strip() for ver in versions.split(" ")]
if "3.6" in versions:
print("::warning title=Deprecated::Support for Python 3.6 ended in 2021.12.23.") print("::warning title=Deprecated::Support for Python 3.6 ended in 2021.12.23.")
if '3.11' in versions: if currentAlphaVersion in versions:
print(f"::notice title=Experimental::Python 3.11 (3.11.0-alpha3) is a pre-release.") print(f"::notice title=Experimental::Python {currentAlphaVersion} ({currentAlphaRelease}) is a pre-release.")
data = { data = {
'python': { 'python': {
'3.6': { 'icon': '⚫', 'until': '2021.12.23' }, '3.6': { 'icon': '⚫', 'until': '2021.12.23' },
@@ -93,7 +110,8 @@ jobs:
'3.8': { 'icon': '🟠', 'until': '2024.10' }, '3.8': { 'icon': '🟠', 'until': '2024.10' },
'3.9': { 'icon': '🟡', 'until': '2025.10' }, '3.9': { 'icon': '🟡', 'until': '2025.10' },
'3.10': { 'icon': '🟢', 'until': '2026.10' }, '3.10': { 'icon': '🟢', 'until': '2026.10' },
'3.11': { 'icon': '🟣', 'until': '2027.10' }, '3.11': { 'icon': '🟢', 'until': '2027.10' },
'3.11': { 'icon': '🟣', 'until': '2028.10' },
'pypy-3.7': { 'icon': '⟲🔴', 'until': '??' }, 'pypy-3.7': { 'icon': '⟲🔴', 'until': '??' },
'pypy-3.8': { 'icon': '⟲🟠', 'until': '??' }, 'pypy-3.8': { 'icon': '⟲🟠', 'until': '??' },
'pypy-3.9': { 'icon': '⟲🟡', 'until': '??' }, 'pypy-3.9': { 'icon': '⟲🟡', 'until': '??' },
@@ -105,6 +123,7 @@ jobs:
'macos': { 'icon': '🍎', 'runs-on': 'macos-latest', 'shell': 'bash' } 'macos': { 'icon': '🍎', 'runs-on': 'macos-latest', 'shell': 'bash' }
} }
} }
jobs = [ jobs = [
{ {
'sysicon': data['sys'][system]['icon'], 'sysicon': data['sys'][system]['icon'],
@@ -112,10 +131,10 @@ jobs:
'runs-on': data['sys'][system]['runs-on'], 'runs-on': data['sys'][system]['runs-on'],
'shell': data['sys'][system]['shell'], 'shell': data['sys'][system]['shell'],
'pyicon': data['python'][version]['icon'], 'pyicon': data['python'][version]['icon'],
'python': '3.11.0-alpha.3' if version == '3.11' else version 'python': currentAlphaRelease if version == currentAlphaVersion else version
} }
for system in systems for system in systems
for version in (versions if system != 'msys2' else ['3.10']) for version in (versions if system != 'msys2' else [currentMSYS2Version])
] ]
print(f'::set-output name=python_jobs::{jobs!s}') print(f'::set-output name=python_jobs::{jobs!s}')
print("Python jobs:") print("Python jobs:")