From 74960c9c328da6139f6e394d719eaf181ae8fae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Attila=20M=C3=A9sz=C3=A1ros?= Date: Thu, 5 Nov 2026 11:27:18 -0800 Subject: [PATCH] ci: split integration tests by category and shrink the PR matrix Wire up the unused it-category input so each matrix cell runs only one of baseapi, dependent, workflow or other tests, and add the missing integration-tests-other profile so ITs outside those packages still run. Limit PR runs to the oldest and newest Java and Kubernetes versions. Co-Authored-By: Claude --- .github/workflows/build.yml | 8 ++++++-- .github/workflows/integration-tests.yml | 7 ++++++- pom.xml | 23 +++++++++++++++++++++++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6441364993..01fd2a5e21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,15 +10,19 @@ jobs: integration_tests: strategy: matrix: - java: [ 17, 21, 25 ] + # Only the oldest and newest supported Java and Kubernetes versions are covered + java: [ 17, 25 ] # Use the latest versions supported by minikube, otherwise GitHub it will # end up in a throttling requests from minikube and workflow will fail. # Minikube does such requests only if a version is not officially supported. - kubernetes: [ 'v1.34.11', 'v1.35.8', 'v1.36.4', 'v1.37.0' ] + kubernetes: [ 'v1.34.11', 'v1.37.0' ] + # Matches the integration-tests- profiles in the root pom.xml + it-category: [ 'baseapi', 'dependent', 'workflow', 'other' ] uses: ./.github/workflows/integration-tests.yml with: java-version: ${{ matrix.java }} kube-version: ${{ matrix.kubernetes }} + it-category: ${{ matrix.it-category }} httpclient-tests: strategy: diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 3f1353efea..798bee39f4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -21,10 +21,15 @@ on: type: string required: false default: '' + it-category: + description: 'Integration test category (baseapi, dependent, workflow, other); all tests if empty' + type: string + required: false + default: '' jobs: integration_tests: - name: Integration tests (${{ inputs.java-version }}, ${{ inputs.kube-version }}, ${{ inputs.http-client }}) + name: Integration tests (${{ inputs.java-version }}, ${{ inputs.kube-version }}, ${{ inputs.http-client }}${{ inputs.it-category != '' && format(', {0}', inputs.it-category) || '' }}) runs-on: ubuntu-latest continue-on-error: ${{ inputs.experimental }} timeout-minutes: 120 diff --git a/pom.xml b/pom.xml index e9277efe34..393378979a 100644 --- a/pom.xml +++ b/pom.xml @@ -539,6 +539,29 @@ + + integration-tests-other + + + + org.apache.maven.plugins + maven-surefire-plugin + + + **/*IT.java + + + **/*Test.java + **/*E2E.java + io/javaoperatorsdk/operator/baseapi/** + io/javaoperatorsdk/operator/dependent/** + io/javaoperatorsdk/operator/workflow/** + + + + + + minimal-watch-timeout-dependent-it