merge check-latest in check-non-eol
This commit is contained in:
parent
30b4b62ea1
commit
dee46fa8d4
|
@ -15,19 +15,21 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-non-eol-available: # non EOL versions of python shall be available on all workers
|
check-non-eol-available: # non EOL versions of python shall be available on all workers
|
||||||
name: non-eol ${{ matrix.python-version }} ${{ matrix.os }}
|
name: non-eol ${{ matrix.python-version }} ${{ matrix.check-latest && 'latest' || '' }} ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
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]
|
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
||||||
|
check-latest: [false, true]
|
||||||
|
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]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Setup Python and check latest
|
- name: Setup Python ${{ matrix.check-latest && 'and check latest' || '' }}
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
check-latest: ${{ matrix.check-latest }}
|
||||||
- name: Validate version
|
- name: Validate version
|
||||||
run: |
|
run: |
|
||||||
$pythonVersion = (python --version)
|
$pythonVersion = (python --version)
|
||||||
|
@ -360,30 +362,6 @@ jobs:
|
||||||
- name: Run simple code
|
- name: Run simple code
|
||||||
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
run: ${{ steps.setup-python.outputs.python-path }} -c 'import math; print(math.factorial(5))'
|
||||||
|
|
||||||
check-latest:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
||||||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Setup Python and check latest
|
|
||||||
uses: ./
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python-version }}
|
|
||||||
check-latest: true
|
|
||||||
- name: Validate version
|
|
||||||
run: |
|
|
||||||
$pythonVersion = (python --version)
|
|
||||||
if ("$pythonVersion" -NotMatch "${{ matrix.python-version }}"){
|
|
||||||
Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python-version }}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
$pythonVersion
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
setup-python-multiple-python-versions:
|
setup-python-multiple-python-versions:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
|
Loading…
Reference in New Issue