Skip to content

Commit 4394208

Browse files
committed
fix: less minikube downloads and starts in CI
Signed-off-by: xstefank <xstefank122@gmail.com>
1 parent ea57fed commit 4394208

File tree

3 files changed

+44
-101
lines changed

3 files changed

+44
-101
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -11,83 +11,11 @@ on:
1111
required: true
1212

1313
jobs:
14-
set_up_kubernetes:
15-
name: Set up Kubernetes ${{ inputs.kube-version }}
16-
runs-on: ubuntu-latest
17-
steps:
18-
- uses: actions/checkout@v4
19-
20-
- name: Set up Minikube
21-
uses: manusa/actions-setup-minikube@v2.13.1
22-
with:
23-
minikube version: 'v1.34.0'
24-
kubernetes version: '${{ inputs.kube-version }}'
25-
driver: 'docker'
26-
github token: ${{ secrets.GITHUB_TOKEN }}
27-
28-
- name: Save minikube directory
29-
id: minikube
30-
run: |
31-
echo "minikube-dir=$MINIKUBE_HOME" >> $GITHUB_OUTPUT
32-
33-
- name: Upload minikube
34-
uses: actions/upload-artifact@v4
35-
with:
36-
name: minikube-${{ inputs.kube-version }}
37-
path: ${{ steps.minikube.outputs.minikube-dir }}
38-
include-hidden-files: true
39-
4014
integration_tests:
41-
name: "JDK: ${{ matrix.java }}, IT category: ${{ matrix.it-category }}"
42-
needs: set_up_kubernetes
4315
strategy:
4416
matrix:
4517
java: [ 17, 21 ]
46-
it-category: [ 'baseapi', 'dependent', 'workflow' ]
4718
uses: ./.github/workflows/integration-tests.yml
4819
with:
4920
kube-version: ${{ inputs.kube-version }}
5021
java-version: ${{ matrix.java }}
51-
it-category: ${{ matrix.it-category }}
52-
53-
http_client_tests:
54-
name: "JDK: ${{ matrix.java }}, IT category: ${{ matrix.it-category }}, HTTP client: ${{ matrix.httpclient }}"
55-
needs: set_up_kubernetes
56-
strategy:
57-
matrix:
58-
java: [ 17, 21 ]
59-
it-category: [ 'baseapi' ]
60-
httpclient: [ 'vertx', 'jdk', 'jetty' ]
61-
uses: ./.github/workflows/integration-tests.yml
62-
with:
63-
kube-version: ${{ inputs.kube-version }}
64-
java-version: ${{ matrix.java }}
65-
it-category: ${{ matrix.it-category }}
66-
http-client: ${{ matrix.httpclient }}
67-
68-
special_integration_tests:
69-
name: "Special integration tests (${{ matrix.java }})"
70-
needs: set_up_kubernetes
71-
runs-on: ubuntu-latest
72-
strategy:
73-
matrix:
74-
java: [ 17, 21 ]
75-
steps:
76-
- uses: actions/checkout@v4
77-
- name: Set up Java and Maven
78-
uses: actions/setup-java@v4
79-
with:
80-
distribution: temurin
81-
java-version: ${{ matrix.java }}
82-
- name: Run Special Integration Tests
83-
run: ./mvnw ${MAVEN_ARGS} -B package -P minimal-watch-timeout-dependent-it --file pom.xml
84-
85-
delete_kubernetes:
86-
needs: [ integration_tests, http_client_tests, special_integration_tests ]
87-
if: always()
88-
name: Delete Kubernetes ${{ inputs.kube-version }} artifact
89-
runs-on: ubuntu-latest
90-
steps:
91-
- uses: geekyeggo/delete-artifact@v5
92-
with:
93-
name: minikube-${{ inputs.kube-version }}

.github/workflows/integration-tests.yml

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,19 @@ on:
2121
type: string
2222
required: false
2323
default: ''
24-
it-category:
25-
type: string
26-
required: false
27-
default: ''
2824

2925
jobs:
3026
integration_tests:
31-
name: "Experimental: ${{ inputs.experimental }}, Checkout ref: ${{ inputs.checkout-ref }}"
27+
name: |
28+
Integration tests:
29+
JDK: ${{ inputs.java-version }}
30+
Kube: ${{ inputs.kube-version }}
31+
Experimental: ${{ inputs.experimental }}
32+
Checkout ref: ${{ inputs.checkout-ref }}
3233
runs-on: ubuntu-latest
3334
continue-on-error: ${{ inputs.experimental }}
34-
timeout-minutes: 40
35+
timeout-minutes: 180
3536
steps:
36-
- name: Output test information
37-
run: echo "Running ITs with ${{ inputs.http-client }}, ${{ inputs.kube-version }}, ${{ inputs.java-version }}"
3837
- uses: actions/checkout@v4
3938
with:
4039
ref: ${{ inputs.checkout-ref }}
@@ -44,25 +43,40 @@ jobs:
4443
distribution: temurin
4544
java-version: ${{ inputs.java-version }}
4645
cache: 'maven'
47-
- name: Download minikube artifact for Kubernetes ${{ inputs.kube-version }}
48-
uses: actions/download-artifact@v4
46+
- name: Set up Minikube
47+
uses: manusa/actions-setup-minikube@v2.13.1
4948
with:
50-
name: minikube-${{inputs.kube-version}}
51-
path: minikube
52-
- name: Start minikube with Kubernetes ${{ inputs.kube-version }}
49+
minikube version: 'v1.34.0'
50+
kubernetes version: '${{ inputs.kube-version }}'
51+
driver: 'docker'
52+
github token: ${{ secrets.GITHUB_TOKEN }}
53+
- name: "Run tests"
5354
run: |
54-
# wait for docker
55-
docker version -f '{{.Server.Version}} - {{.Client.Version}}'
56-
export MINIKUBE_HOME=$PWD/minikube
57-
minikube start --driver=docker
58-
kubectl version
59-
- name: "${{inputs.it-category}} integration tests (kube: ${{ inputs.kube-version }} / java: ${{ inputs.java-version }} / client: ${{ inputs.http-client }})"
60-
run: |
61-
if [ -z "${{inputs.it-category}}" ]; then
62-
it_profile="integration-tests"
63-
else
64-
it_profile="integration-tests-${{inputs.it-category}}"
65-
fi
66-
echo "Using profile: ${it_profile}"
67-
./mvnw ${MAVEN_ARGS} -T1C -B install -DskipTests -Pno-apt --file pom.xml
68-
./mvnw ${MAVEN_ARGS} -T1C -B package -P${it_profile} -Dfabric8-httpclient-impl.name=${{inputs.http-client}} --file pom.xml
55+
echo "Running tests..."
56+
./mvnw ${MAVEN_ARGS} -T1C -B install -DskipTests --file pom.xml
57+
58+
echo "Running baseapi integration tests with the default HTTP client..."
59+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi --file pom.xml
60+
61+
echo "Running dependent integration tests with the default HTTP client..."
62+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-dependent --file pom.xml
63+
64+
echo "Running workflow integration tests with the default HTTP client..."
65+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-workflow --file pom.xml
66+
67+
echo "Running minimal-watch-timeout-dependent-it integration tests with the default HTTP client..."
68+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pminimal-watch-timeout-dependent-it --file pom.xml
69+
70+
echo "Running all integration tests with the default HTTP client..."
71+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests --file pom.xml
72+
73+
echo "Running baseapi integration tests with the Vert.x HTTP client..."
74+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi -Dfabric8-httpclient-impl.name=vertx --file pom.xml
75+
76+
echo "Running baseapi integration tests with the JDK HTTP client..."
77+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi -Dfabric8-httpclient-impl.name=jdk --file pom.xml
78+
79+
echo "Running baseapi integration tests with the Jetty HTTP client..."
80+
./mvnw ${MAVEN_ARGS} -T1C -B package -Pintegration-tests-baseapi -Dfabric8-httpclient-impl.name=jetty --file pom.xml
81+
82+

.github/workflows/pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
workflow_dispatch:
1616
jobs:
1717
check_format_and_unit_tests:
18+
name: Check format and unit tests
1819
runs-on: ubuntu-latest
1920
steps:
2021
- uses: actions/checkout@v4
@@ -31,7 +32,7 @@ jobs:
3132
run: ./mvnw ${MAVEN_ARGS} clean install -Pno-apt --file pom.xml
3233

3334
build:
34-
name: Integration tests with Kubernetes ${{ matrix.kubernetes }}
35+
name: "Integration tests (Kube: ${{ matrix.kubernetes }})"
3536
strategy:
3637
matrix:
3738
kubernetes: [ 'v1.29.12','1.30.8', '1.31.4', '1.32.0' ]

0 commit comments

Comments
 (0)