add e2e testing for freethread and bump cache to 4.0.2

This commit is contained in:
priya-kinthali 2025-03-14 17:01:33 +05:30
parent 19e4675e06
commit baae874f37
32 changed files with 304 additions and 10549 deletions

View file

@ -29,7 +29,7 @@ jobs:
macos-13,
ubuntu-latest
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0, '3.13.2t']
steps:
- name: Checkout
uses: actions/checkout@v4
@ -72,7 +72,7 @@ jobs:
macos-13,
ubuntu-latest
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0, '3.13.2t']
steps:
- name: Checkout
uses: actions/checkout@v4
@ -118,7 +118,7 @@ jobs:
macos-13,
ubuntu-latest
]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0]
python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.0, '3.13.2t']
steps:
- name: Checkout
uses: actions/checkout@v4
@ -196,6 +196,56 @@ jobs:
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'
setup-versions-from-standard-pyproject-file-freethread:
name: Setup ${{ matrix.python }} ${{ matrix.os }} standard pyproject file freethread
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
macos-13,
ubuntu-latest
]
python: [3.13.0, 3.13.1, 3.13.2]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: build-version-file ${{ matrix.python }}
run: |
echo '[project]
requires-python = "${{ matrix.python }}"
' > pyproject.toml
- name: setup-python ${{ matrix.python }} freethread
id: setup-python-freethread
uses: ./
with:
python-version-file: pyproject.toml
freethreaded: true
- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python-freethread.outputs.python-path }}'
shell: bash
- name: Validate version
run: |
$pythonVersion = (python --version)
if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
exit 1
}
$pythonVersion
shell: pwsh
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'
setup-versions-from-poetry-pyproject-file:
name: Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file
runs-on: ${{ matrix.os }}
@ -245,6 +295,56 @@ jobs:
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'
setup-versions-from-poetry-pyproject-file-freethread:
name: Setup ${{ matrix.python }} ${{ matrix.os }} poetry pyproject file for freethread
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
[
macos-latest,
windows-latest,
ubuntu-20.04,
ubuntu-22.04,
macos-13,
ubuntu-latest
]
python: [3.13.0, 3.13.1, 3.13.2]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: build-version-file ${{ matrix.python }}
run: |
echo '[tool.poetry.dependencies]
python = "${{ matrix.python }}"
' > pyproject.toml
- name: setup-python ${{ matrix.python }} freethread
id: setup-python-freethread
uses: ./
with:
python-version-file: pyproject.toml
freethreaded: true
- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python-freethread.outputs.python-path }}'
shell: bash
- name: Validate version
run: |
$pythonVersion = (python --version)
if ("Python ${{ matrix.python }}" -ne "$pythonVersion"){
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}"
exit 1
}
$pythonVersion
shell: pwsh
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'
setup-versions-from-tool-versions-file:
name: Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file
runs-on: ${{ matrix.os }}
@ -260,7 +360,7 @@ jobs:
macos-13,
ubuntu-latest
]
python: [3.13.0, 3.14-dev, pypy3.11-7.3.18, graalpy-24.1.2]
python: [3.13.2t, 3.13.0, 3.14-dev, pypy3.11-7.3.18, graalpy-24.1.2]
exclude:
- os: windows-latest
python: graalpy-24.1.2
@ -327,6 +427,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
python: [3.14-dev, 3.14t-dev]
steps:
- name: Checkout
uses: actions/checkout@v4
@ -335,7 +436,7 @@ jobs:
id: setup-python
uses: ./
with:
python-version: '3.14-dev'
python-version: ${{ matrix.python }}
- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}'
@ -376,6 +477,35 @@ jobs:
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'
setup-prerelease-version-freethread:
name: Setup 3.14 ${{ matrix.os }} freethread
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest, macos-13]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: setup-python 3.14 freethread
id: setup-python-freethread
uses: ./
with:
python-version: '3.14t'
freethreaded: true
allow-prereleases: true
- name: Check python-path
run: ./__tests__/check-python-path.sh '${{ steps.setup-python-freethread.outputs.python-path }}'
shell: bash
- name: Validate version
run: ${{ startsWith(steps.setup-python-freethread.outputs.python-version, '3.14.') }}
shell: bash
- name: Run simple code
run: python -c 'import math; print(math.factorial(5))'
setup-versions-noenv:
name: Setup ${{ matrix.python }} ${{ matrix.os }} (noenv)
@ -392,7 +522,7 @@ jobs:
macos-13,
ubuntu-latest
]
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
python: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.13t']
steps:
- name: Checkout
uses: actions/checkout@v4
@ -416,7 +546,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.13t']
steps:
- uses: actions/checkout@v4
- name: Setup Python and check latest
@ -451,6 +581,7 @@ jobs:
3.11
3.12
3.13
3.13t
check-latest: true
- name: Validate version
run: |