|
15 | 15 |
|
16 | 16 | jobs: |
17 | 17 | 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 }} |
19 | 19 | runs-on: ${{ matrix.os }} |
20 | 20 | strategy: |
21 | 21 | fail-fast: false |
22 | 22 | matrix: |
23 | 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] |
24 | 24 | python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] |
| 25 | + check-latest: [true, false] |
25 | 26 | steps: |
26 | 27 | - uses: actions/checkout@v4 |
27 | 28 | - name: Setup Python and check latest |
28 | 29 | uses: ./ |
29 | 30 | with: |
30 | 31 | python-version: ${{ matrix.python-version }} |
| 32 | + check-latest: ${{ matrix.check-latest }} |
31 | 33 | - name: Validate version |
32 | 34 | run: | |
33 | 35 | $pythonVersion = (python --version) |
@@ -360,30 +362,6 @@ jobs: |
360 | 362 | - name: Run simple code |
361 | 363 | run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))' |
362 | 364 |
|
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 | | - |
387 | 365 | setup-python-multiple-python-versions: |
388 | 366 | runs-on: ${{ matrix.os }} |
389 | 367 | strategy: |
|
0 commit comments