From 71de5f2ad243c3c0b1b76cc7cb875e07cc164d07 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 8 Jun 2024 15:23:11 +0200 Subject: [PATCH] tests(ci): check non-EOL pythons are available on all workers --- .github/workflows/test-python.yml | 50 ++++++++++++++++--------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index ebb5bf0..a5acf8a 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -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.9', '3.10', '3.11', '3.12', '3.13'] + check-latest: [false, true] + os: [macos-13, macos-14, macos-15, windows-2019, windows-2022, windows-2025, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, ubuntu-22.04-arm, ubuntu-24.04-arm, 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 }} @@ -377,30 +403,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, macos-13] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - 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: