Skip to content

Commit dee46fa

Browse files
committed
merge check-latest in check-non-eol
1 parent 30b4b62 commit dee46fa

File tree

1 file changed

+5
-27
lines changed

1 file changed

+5
-27
lines changed

Diff for: .github/workflows/test-python.yml

+5-27
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ on:
1515

1616
jobs:
1717
check-non-eol-available: # non EOL versions of python shall be available on all workers
18-
name: non-eol ${{ matrix.python-version }} ${{ matrix.os }}
18+
name: non-eol ${{ matrix.python-version }} ${{ matrix.check-latest && 'latest' || '' }} ${{ matrix.os }}
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [macos-11, macos-12, macos-13, macos-14, windows-2019, windows-2022, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, setup-actions-ubuntu-arm64-2-core, setup-actions-windows-arm64-4-core]
2423
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
24+
check-latest: [false, true]
25+
os: [macos-11, macos-12, macos-13, macos-14, windows-2019, windows-2022, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, setup-actions-ubuntu-arm64-2-core, setup-actions-windows-arm64-4-core]
2526
steps:
2627
- uses: actions/checkout@v4
27-
- name: Setup Python and check latest
28+
- name: Setup Python ${{ matrix.check-latest && 'and check latest' || '' }}
2829
uses: ./
2930
with:
3031
python-version: ${{ matrix.python-version }}
32+
check-latest: ${{ matrix.check-latest }}
3133
- name: Validate version
3234
run: |
3335
$pythonVersion = (python --version)
@@ -360,30 +362,6 @@ jobs:
360362
- name: Run simple code
361363
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
362364

363-
check-latest:
364-
runs-on: ${{ matrix.os }}
365-
strategy:
366-
fail-fast: false
367-
matrix:
368-
os: [ubuntu-latest, windows-latest, macos-latest]
369-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
370-
steps:
371-
- uses: actions/checkout@v4
372-
- name: Setup Python and check latest
373-
uses: ./
374-
with:
375-
python-version: ${{ matrix.python-version }}
376-
check-latest: true
377-
- name: Validate version
378-
run: |
379-
$pythonVersion = (python --version)
380-
if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){
381-
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}"
382-
exit 1
383-
}
384-
$pythonVersion
385-
shell: pwsh
386-
387365
setup-python-multiple-python-versions:
388366
runs-on: ${{ matrix.os }}
389367
strategy:

0 commit comments

Comments
 (0)