Skip to content

Commit a013501

Browse files
committed
tests(ci): check non-EOL pythons are available on all workers
1 parent 8039c45 commit a013501

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

.github/workflows/test-python.yml

+26-24
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,32 @@ on:
1414
workflow_dispatch:
1515

1616
jobs:
17+
check-non-eol-available: # non EOL versions of python shall be available on all workers
18+
name: non-eol ${{ matrix.python-version }} ${{ matrix.check-latest && 'latest' || '' }} ${{ matrix.os }}
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
24+
check-latest: [false, true]
25+
os: [macos-13, macos-14, macos-15, windows-2019, windows-2022, windows-2025, ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm, setup-actions-windows-arm64-4-core]
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Setup Python ${{ matrix.check-latest && 'and check latest' || '' }}
29+
uses: ./
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
check-latest: ${{ matrix.check-latest }}
33+
- name: Validate version
34+
run: |
35+
$pythonVersion = (python --version)
36+
if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){
37+
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}"
38+
exit 1
39+
}
40+
$pythonVersion
41+
shell: pwsh
42+
1743
setup-versions-from-manifest:
1844
name: Setup ${{ matrix.python }} ${{ matrix.os }}
1945
runs-on: ${{ matrix.os }}
@@ -377,30 +403,6 @@ jobs:
377403
- name: Run simple code
378404
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
379405

380-
check-latest:
381-
runs-on: ${{ matrix.os }}
382-
strategy:
383-
fail-fast: false
384-
matrix:
385-
os: [ubuntu-latest, windows-latest, macos-latest, macos-13]
386-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
387-
steps:
388-
- uses: actions/checkout@v4
389-
- name: Setup Python and check latest
390-
uses: ./
391-
with:
392-
python-version: ${{ matrix.python-version }}
393-
check-latest: true
394-
- name: Validate version
395-
run: |
396-
$pythonVersion = (python --version)
397-
if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){
398-
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}"
399-
exit 1
400-
}
401-
$pythonVersion
402-
shell: pwsh
403-
404406
setup-python-multiple-python-versions:
405407
runs-on: ${{ matrix.os }}
406408
strategy:

0 commit comments

Comments
 (0)