From a4e360013d9c4ffad1c01fdd63cca3b52726e56e Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Wed, 18 Dec 2024 18:17:10 +0100 Subject: [PATCH] build: use also different K8s versions for E2E testing in GHA (#659) * build: use also different K8s versions for E2E testing in GHA Signed-off-by: Matteo Mortari * refactor matrix GHA Signed-off-by: Matteo Mortari * demo on PR how it would look on main merges Signed-off-by: Matteo Mortari * revert as intentended on PR Revert "demo on PR how it would look on main merges" This reverts commit ecd87788564e2e955bce79c7fae6b7e578f0392b. Signed-off-by: Matteo Mortari * add K8s version on suggestion by Andrey Signed-off-by: Matteo Mortari --------- Signed-off-by: Matteo Mortari --- .github/workflows/python-tests.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index cabe5b04..360a33bf 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -66,12 +66,25 @@ jobs: fi test: - name: Test against Py ${{ matrix.python }} + name: Test against Py ${{ matrix.python }} and K8s ${{ matrix.kubernetes-version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python: ["3.12", "3.11", "3.10", "3.9"] + python: ["3.12"] # see below for versions 3.9-3.11 + kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2", "v1.30.6", "v1.31.0"] + exclude: # on main merges (not PRs), use also different K8s versions for E2E testing + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.31.0' }} + include: # test Py versions only with a reference K8s version, designated currently to kubernetes-version: v1.27.11 + - python: "3.11" + kubernetes-version: "v1.27.11" + - python: "3.10" + kubernetes-version: "v1.27.11" + - python: "3.9" + kubernetes-version: "v1.27.11" env: FORCE_COLOR: "1" IMG_ORG: kubeflow @@ -124,8 +137,9 @@ jobs: - name: Start Kind Cluster uses: helm/kind-action@v1.11.0 with: - node_image: "kindest/node:v1.27.11" + node_image: kindest/node:${{ matrix.kubernetes-version }} cluster_name: chart-testing-py-${{ matrix.python }} + kubectl_version: ${{ matrix.kubernetes-version }} - name: Load Local Registry Test Image env: IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}"