From f7b573585d2613d02310c805729e106df62daa5f Mon Sep 17 00:00:00 2001 From: Dennis Laetsch Date: Tue, 14 Oct 2025 08:54:26 +0200 Subject: [PATCH 1/5] added test --- test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test diff --git a/test b/test new file mode 100644 index 0000000..e69de29 From fb1cb1143fa141e3c92ebf059c256f982a359a6d Mon Sep 17 00:00:00 2001 From: Dennis Laetsch Date: Tue, 14 Oct 2025 08:56:54 +0200 Subject: [PATCH 2/5] type in if --- .github/workflows/maven.workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.workflow.yml b/.github/workflows/maven.workflow.yml index a7c546b..a894ab6 100644 --- a/.github/workflows/maven.workflow.yml +++ b/.github/workflows/maven.workflow.yml @@ -47,7 +47,7 @@ jobs: quality_gate: runs-on: ubuntu-latest needs: build_and_test - if: github.event_name == 'pull-request' + if: github.event_name == 'pull_request' steps: - name: Sonar-Analyse run: | From 8b6d975a3acd44d72534bb4df4d1a2006cf8a11a Mon Sep 17 00:00:00 2001 From: Dennis Laetsch Date: Tue, 14 Oct 2025 09:04:20 +0200 Subject: [PATCH 3/5] added coverage --- pom.xml | 13 +++++++++++++ product-backend/pom.xml | 24 ++++++++++++++++++++++++ 2 files changed, 37 insertions(+) diff --git a/pom.xml b/pom.xml index 1b88660..5872082 100644 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,19 @@ + + org.jacoco + jacoco-maven-plugin + + + report-aggregate + verify + + report-aggregate + + + + org.codehaus.mojo versions-maven-plugin diff --git a/product-backend/pom.xml b/product-backend/pom.xml index 4f5b744..378ff6c 100644 --- a/product-backend/pom.xml +++ b/product-backend/pom.xml @@ -32,6 +32,30 @@ + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + + prepare-agent + + + + report + test + + report + + + + XML + + + + + org.springframework.boot spring-boot-maven-plugin From 5f13edbf7346af36eaccf145f3ead5650f46d5e0 Mon Sep 17 00:00:00 2001 From: Dennis Laetsch Date: Tue, 14 Oct 2025 09:23:10 +0200 Subject: [PATCH 4/5] added coverage --- .github/workflows/maven.workflow.yml | 5 +-- order-backend/pom.xml | 57 ++++++++++++++---------- pacts/order-backend-product-backend.json | 2 +- product-backend/pom.xml | 57 ++++++++++++++---------- 4 files changed, 69 insertions(+), 52 deletions(-) diff --git a/.github/workflows/maven.workflow.yml b/.github/workflows/maven.workflow.yml index a894ab6..8768c23 100644 --- a/.github/workflows/maven.workflow.yml +++ b/.github/workflows/maven.workflow.yml @@ -26,7 +26,7 @@ jobs: distribution: 'temurin' cache: maven - name: Maven Build-And-Test - run: mvn -B -T1C -pl order-backend,product-backend -am clean verify + run: mvn -B -T1C -pl order-backend,product-backend -am clean verify -Pcoverage - name: Publish JUnit results if: always() @@ -50,5 +50,4 @@ jobs: if: github.event_name == 'pull_request' steps: - name: Sonar-Analyse - run: | - echo: "test" \ No newline at end of file + run: echo "Quality Gate Step läuft" \ No newline at end of file diff --git a/order-backend/pom.xml b/order-backend/pom.xml index 1277d9a..af9c69a 100644 --- a/order-backend/pom.xml +++ b/order-backend/pom.xml @@ -38,36 +38,45 @@ runtime + + + coverage + + + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + + prepare-agent + + + + report + test + + report + + + + XML + + + + + + + + + org.springframework.boot spring-boot-maven-plugin - - org.jacoco - jacoco-maven-plugin - 0.8.11 - - - - prepare-agent - - - - report - test - - report - - - - XML - - - - - au.com.dius.pact.provider maven diff --git a/pacts/order-backend-product-backend.json b/pacts/order-backend-product-backend.json index 6a794c6..7f7ff3f 100644 --- a/pacts/order-backend-product-backend.json +++ b/pacts/order-backend-product-backend.json @@ -26,7 +26,7 @@ }, "response": { "body": { - "currency": "EUR", + "currency": "USD", "id": 1, "name": "TestProduct", "price": 19.99 diff --git a/product-backend/pom.xml b/product-backend/pom.xml index 378ff6c..a7509e1 100644 --- a/product-backend/pom.xml +++ b/product-backend/pom.xml @@ -30,32 +30,41 @@ provided + + + coverage + + + + org.jacoco + jacoco-maven-plugin + 0.8.11 + + + + prepare-agent + + + + report + test + + report + + + + XML + + + + + + + + + - - org.jacoco - jacoco-maven-plugin - 0.8.11 - - - - prepare-agent - - - - report - test - - report - - - - XML - - - - - org.springframework.boot spring-boot-maven-plugin From f792e8b2d8742735a2fe9ef5386236f97bce4786 Mon Sep 17 00:00:00 2001 From: Dennis Laetsch Date: Tue, 14 Oct 2025 09:29:54 +0200 Subject: [PATCH 5/5] coverage --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index 5872082..dddb4c9 100644 --- a/pom.xml +++ b/pom.xml @@ -12,6 +12,10 @@ 3.5.6 21 4.6.17 + + ${maven.multiModuleProjectDirectory}/report-aggregate/target/site/ + jacoco-aggregate/jacoco.xml +