Skip to content
Closed
Show file tree
Hide file tree
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
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-<category> 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:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,58 +21,63 @@
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
env:
MINIKUBE_VERSION: v1.39.0
steps:
- uses: actions/checkout@v7
with:
ref: ${{ inputs.checkout-ref }}
- name: Set up Java and Maven
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: ${{ inputs.java-version }}
cache: 'maven'
# minikube downloads kubelet, kubeadm and kubectl from dl.k8s.io on every start, which
# regularly times out when many matrix jobs start at once
- name: Cache Minikube downloads
uses: actions/cache@v6
with:
path: ${{ runner.temp }}/.minikube/cache
key: minikube-${{ runner.os }}-${{ env.MINIKUBE_VERSION }}-${{ inputs.kube-version }}-none
- name: Set up Minikube
id: minikube
continue-on-error: true
uses: manusa/actions-setup-minikube@v2.19.0
with:
minikube version: ${{ env.MINIKUBE_VERSION }}
kubernetes version: '${{ inputs.kube-version }}'
github token: ${{ github.token }}
- name: Clean up failed Minikube setup
if: steps.minikube.outcome == 'failure'
run: sudo -E --preserve-env=HOME,MINIKUBE_HOME "$MINIKUBE_HOME/minikube" delete || true
- name: Set up Minikube (retry)
if: steps.minikube.outcome == 'failure'
uses: manusa/actions-setup-minikube@v2.19.0
with:
minikube version: ${{ env.MINIKUBE_VERSION }}
kubernetes version: '${{ inputs.kube-version }}'
github token: ${{ github.token }}

- name: "${{inputs.it-category}} integration tests (kube: ${{ inputs.kube-version }} / java: ${{ inputs.java-version }} / client: ${{ inputs.http-client }})"
run: |
if [ -z "${{inputs.it-category}}" ]; then
it_profile="integration-tests"
else
it_profile="integration-tests-${{inputs.it-category}}"
fi
echo "Using profile: ${it_profile}"
./mvnw ${MAVEN_ARGS} -T1C -B install -DskipTests --file pom.xml
./mvnw ${MAVEN_ARGS} -T1C -B package -P${it_profile} -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
23 changes: 23 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,29 @@
</plugins>
</build>
</profile>
<profile>
<id>integration-tests-other</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
<excludes>
<exclude>**/*Test.java</exclude>
<exclude>**/*E2E.java</exclude>
<exclude>io/javaoperatorsdk/operator/baseapi/**</exclude>
<exclude>io/javaoperatorsdk/operator/dependent/**</exclude>
<exclude>io/javaoperatorsdk/operator/workflow/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Special category of tests. See usage in source code. -->
<profile>
<id>minimal-watch-timeout-dependent-it</id>
Expand Down
Loading