From 30b4b62ea1854134b9ba11485c78ab333a1b85a0 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 8 Jun 2024 15:23:11 +0200 Subject: [PATCH 1/3] tests(ci): check non-EOL pythons are available on all workers --- .github/workflows/test-python.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index c8aef26cc..4043e9241 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -14,6 +14,30 @@ 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.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + 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'] + steps: + - uses: actions/checkout@v4 + - name: Setup Python and check latest + uses: ./ + with: + python-version: ${{ matrix.python-version }} + - 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 }} From dee46fa8d47f0db41cb465a779395c2682c96a05 Mon Sep 17 00:00:00 2001 From: mayeut Date: Wed, 12 Jun 2024 08:00:18 +0200 Subject: [PATCH 2/3] merge check-latest in check-non-eol --- .github/workflows/test-python.yml | 32 +++++-------------------------- 1 file changed, 5 insertions(+), 27 deletions(-) diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 4043e9241..b36c354d1 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -15,19 +15,21 @@ on: jobs: 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 }} strategy: fail-fast: false 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'] + 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: - uses: actions/checkout@v4 - - name: Setup Python and check latest + - 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) @@ -360,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: From 20171ef3a55d7b3f051c406848ae422e31ebebb1 Mon Sep 17 00:00:00 2001 From: mayeut Date: Tue, 2 Jul 2024 09:13:28 +0200 Subject: [PATCH 3/3] remove macos-11 --- .github/workflows/test-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index b36c354d1..9328f5161 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -22,7 +22,7 @@ jobs: matrix: 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] + 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' || '' }}