forked from operator-framework/java-operator-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: less minikube downloads and starts in CI
Signed-off-by: xstefank <[email protected]>
- Loading branch information
Showing
3 changed files
with
47 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
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 }} | ||
|
@@ -44,25 +43,44 @@ 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/[email protected] | ||
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 -e "\n\n" | ||
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-worklow --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 all end-to-end tests with the default HTTP client..." | ||
# ./mvnw ${MAVEN_ARGS} -T1C -B package -Pend-to-end-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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters