Skip to content

fix: less minikube downloads and starts in CI #2711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
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
72 changes: 0 additions & 72 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,83 +11,11 @@ on:
required: true

jobs:
set_up_kubernetes:
name: Set up Kubernetes ${{ inputs.kube-version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Minikube
uses: manusa/actions-setup-minikube@v2.13.1
with:
minikube version: 'v1.34.0'
kubernetes version: '${{ inputs.kube-version }}'
driver: 'docker'
github token: ${{ secrets.GITHUB_TOKEN }}

- name: Save minikube directory
id: minikube
run: |
echo "minikube-dir=$MINIKUBE_HOME" >> $GITHUB_OUTPUT

- name: Upload minikube
uses: actions/upload-artifact@v4
with:
name: minikube-${{ inputs.kube-version }}
path: ${{ steps.minikube.outputs.minikube-dir }}
include-hidden-files: true

integration_tests:
name: "JDK: ${{ matrix.java }}, IT category: ${{ matrix.it-category }}"
needs: set_up_kubernetes
strategy:
matrix:
java: [ 17, 21 ]
it-category: [ 'baseapi', 'dependent', 'workflow' ]
uses: ./.github/workflows/integration-tests.yml
with:
kube-version: ${{ inputs.kube-version }}
java-version: ${{ matrix.java }}
it-category: ${{ matrix.it-category }}

http_client_tests:
name: "JDK: ${{ matrix.java }}, IT category: ${{ matrix.it-category }}, HTTP client: ${{ matrix.httpclient }}"
needs: set_up_kubernetes
strategy:
matrix:
java: [ 17, 21 ]
it-category: [ 'baseapi' ]
httpclient: [ 'vertx', 'jdk', 'jetty' ]
uses: ./.github/workflows/integration-tests.yml
with:
kube-version: ${{ inputs.kube-version }}
java-version: ${{ matrix.java }}
it-category: ${{ matrix.it-category }}
http-client: ${{ matrix.httpclient }}

special_integration_tests:
name: "Special integration tests (${{ matrix.java }})"
needs: set_up_kubernetes
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
steps:
- uses: actions/checkout@v4
- name: Set up Java and Maven
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Run Special Integration Tests
run: ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml

delete_kubernetes:
needs: [ integration_tests, http_client_tests, special_integration_tests ]
if: always()
name: Delete Kubernetes ${{ inputs.kube-version }} artifact
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v5
with:
name: minikube-${{ inputs.kube-version }}
70 changes: 42 additions & 28 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@ on:
type: string
required: false
default: ''
it-category:
type: string
required: false
default: ''

jobs:
integration_tests:
name: "Experimental: ${{ inputs.experimental }}, Checkout ref: ${{ inputs.checkout-ref }}"
name: |
Integration tests:
JDK: ${{ inputs.java-version }}
Kube: ${{ inputs.kube-version }}
Experimental: ${{ inputs.experimental }}
Checkout ref: ${{ inputs.checkout-ref }}
runs-on: ubuntu-latest
continue-on-error: ${{ inputs.experimental }}
timeout-minutes: 40
timeout-minutes: 180
steps:
- name: Output test information
run: echo "Running ITs with ${{ inputs.http-client }}, ${{ inputs.kube-version }}, ${{ inputs.java-version }}"
- uses: actions/checkout@v4
with:
ref: ${{ inputs.checkout-ref }}
Expand All @@ -44,25 +43,40 @@ jobs:
distribution: temurin
java-version: ${{ inputs.java-version }}
cache: 'maven'
- name: Download minikube artifact for Kubernetes ${{ inputs.kube-version }}
uses: actions/download-artifact@v4
- name: Set up Minikube
uses: manusa/actions-setup-minikube@v2.13.1
with:
name: minikube-${{inputs.kube-version}}
path: minikube
- name: Start minikube with Kubernetes ${{ inputs.kube-version }}
minikube version: 'v1.34.0'
kubernetes version: '${{ inputs.kube-version }}'
driver: 'docker'
github token: ${{ secrets.GITHUB_TOKEN }}
- name: "Run tests"
run: |
# wait for docker
docker version -f '{{.Server.Version}} - {{.Client.Version}}'
export MINIKUBE_HOME=$PWD/minikube
minikube start --driver=docker
kubectl version
- 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 -Pno-apt --file pom.xml
./mvnw ${MAVEN_ARGS} -T1C -B package -P${it_profile} -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml
echo "Running tests..."
./mvnw ${MAVEN_ARGS} -T1C -B install -DskipTests --file pom.xml

echo "Running baseapi integration tests with the default HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi --file pom.xml

echo "Running dependent integration tests with the default HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-dependent --file pom.xml

echo "Running workflow integration tests with the default HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-workflow --file pom.xml

echo "Running minimal-watch-timeout-dependent-it integration tests with the default HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pminimal-watch-timeout-dependent-it --file pom.xml

echo "Running all integration tests with the default HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests --file pom.xml

echo "Running baseapi integration tests with the Vert.x HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi -Dfabric8-httpclient-impl.name=vertx --file pom.xml

echo "Running baseapi integration tests with the JDK HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi -Dfabric8-httpclient-impl.name=jdk --file pom.xml

echo "Running baseapi integration tests with the Jetty HTTP client..."
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi -Dfabric8-httpclient-impl.name=jetty --file pom.xml


3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
workflow_dispatch:
jobs:
check_format_and_unit_tests:
name: Check format and unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -31,7 +32,7 @@ jobs:
run: ./mvnw ${MAVEN_ARGS} clean install -Pno-apt --file pom.xml

build:
name: Integration tests with Kubernetes ${{ matrix.kubernetes }}
name: "Integration tests (Kube: ${{ matrix.kubernetes }})"
strategy:
matrix:
kubernetes: [ 'v1.29.12','1.30.8', '1.31.4', '1.32.0' ]
Expand Down
Loading