Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests(ci): check non-EOL pythons are available on all workers #884

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions .github/workflows/test-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ on:
workflow_dispatch:

jobs:
check-non-eol-available: # non EOL versions of python shall be available on all workers
name: non-eol ${{ matrix.python-version }} ${{ matrix.check-latest && 'latest' || '' }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
check-latest: [false, true]
os: [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:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.check-latest && 'and check latest' || '' }}
uses: ./
with:
python-version: ${{ matrix.python-version }}
check-latest: ${{ matrix.check-latest }}
- 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-versions-from-manifest:
name: Setup ${{ matrix.python }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -336,30 +362,6 @@ jobs:
- name: Run simple code
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:
runs-on: ${{ matrix.os }}
strategy:
Expand Down