From b5bf382f6e029731419ca19fa851e070d5587173 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:20:24 +0000 Subject: [PATCH 01/15] fix: Fix Sonarqube java version --- .gitea/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f143c2a..a6adb1a 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - fix/sonarqube jobs: @@ -15,10 +16,10 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v1 with: - java-version: 17 + java-version: 21 - name: Cache SonarQube packages uses: actions/cache@v1 with: -- 2.45.2 From 8fade50f5d0498d76190616e5be4c84162d0669c Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:39:43 +0000 Subject: [PATCH 02/15] Update build.gradle.kts --- build.gradle.kts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 469dd94..5477482 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,6 +4,13 @@ plugins { id("io.spring.dependency-management") version "1.1.6" id("checkstyle") id("org.sonarqube") version "5.0.0.4638" + id "jacoco" +} + +jacocoTestReport { + reports { + xml.enabled true + } } sonar { -- 2.45.2 From 3cc3ec1f7daf7e804990752bd1d9e3a841276d48 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:41:15 +0000 Subject: [PATCH 03/15] Update build.gradle.kts --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 5477482..e75e09d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,12 +4,12 @@ plugins { id("io.spring.dependency-management") version "1.1.6" id("checkstyle") id("org.sonarqube") version "5.0.0.4638" - id "jacoco" + id("jacoco") } jacocoTestReport { reports { - xml.enabled true + xml.enabled(true) } } -- 2.45.2 From 687b97195837e435d7de429bc87dfea621ea8ff3 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:43:01 +0000 Subject: [PATCH 04/15] Update build.gradle.kts --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index e75e09d..29994b4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,9 +7,9 @@ plugins { id("jacoco") } -jacocoTestReport { +tasks.jacocoTestReport { reports { - xml.enabled(true) + xml.required = false } } -- 2.45.2 From 365d431a80edd15adde508d09aedf6141afffae9 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:45:54 +0000 Subject: [PATCH 05/15] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index a6adb1a..4c447b9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -32,6 +32,8 @@ jobs: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle + - name: Coverage + run: gradle test jacocoTestReport sonarqube - name: Build and analyze env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} -- 2.45.2 From 7bc399ecf24f57782c91f3b3c44eaac50dcc0f07 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:46:43 +0000 Subject: [PATCH 06/15] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4c447b9..f5c6473 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -33,7 +33,7 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle - name: Coverage - run: gradle test jacocoTestReport sonarqube + run: ./gradlew test jacocoTestReport sonarqube - name: Build and analyze env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} -- 2.45.2 From dbf584fd67ce46acc4d2bcd86c4745e152d8fca6 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:49:35 +0000 Subject: [PATCH 07/15] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f5c6473..1506189 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -33,7 +33,10 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} restore-keys: ${{ runner.os }}-gradle - name: Coverage - run: ./gradlew test jacocoTestReport sonarqube + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + run: ./gradlew test jacocoTestReport sonar - name: Build and analyze env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} -- 2.45.2 From 1474d5535dc7cc2a804452abfbc7f87065dbd1ee Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:53:58 +0000 Subject: [PATCH 08/15] Update build.gradle.kts --- build.gradle.kts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 29994b4..ea08bd9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,4 +74,8 @@ dependencies { tasks.withType { useJUnitPlatform() + reports { + junitXml.isEnabled = true // Enable JUnit XML reports + html.isEnabled = true // Enable HTML reports + } } -- 2.45.2 From ba30d74ed3dc74839d433f61ea7cbb0cdcdc9021 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:55:46 +0000 Subject: [PATCH 09/15] Update build.gradle.kts --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index ea08bd9..bd11ac7 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -75,7 +75,7 @@ dependencies { tasks.withType { useJUnitPlatform() reports { - junitXml.isEnabled = true // Enable JUnit XML reports - html.isEnabled = true // Enable HTML reports + junitXml.setEnabled(true) // Enable JUnit XML reports + html.setEnabled(true) // Enable HTML reports } } -- 2.45.2 From dde8430e672d715cfde72d3866f3e1dfd89fdb4e Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:57:09 +0000 Subject: [PATCH 10/15] Update build.gradle.kts --- build.gradle.kts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index bd11ac7..c22e9fe 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,8 +74,12 @@ dependencies { tasks.withType { useJUnitPlatform() +} + +tasks.test { + useJUnitPlatform() reports { junitXml.setEnabled(true) // Enable JUnit XML reports html.setEnabled(true) // Enable HTML reports } -} +} \ No newline at end of file -- 2.45.2 From 47878ad3d3127f07f7ae454fb82ba1383746da71 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 14:58:38 +0000 Subject: [PATCH 11/15] Update build.gradle.kts --- build.gradle.kts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c22e9fe..3ba4ed2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -74,12 +74,4 @@ dependencies { tasks.withType { useJUnitPlatform() -} - -tasks.test { - useJUnitPlatform() - reports { - junitXml.setEnabled(true) // Enable JUnit XML reports - html.setEnabled(true) // Enable HTML reports - } } \ No newline at end of file -- 2.45.2 From a0286d504799f975d4b86115ae1674ba22a871bc Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 15:00:43 +0000 Subject: [PATCH 12/15] Update build.gradle.kts --- build.gradle.kts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3ba4ed2..3449e0d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,8 +8,10 @@ plugins { } tasks.jacocoTestReport { + dependsOn(tasks.test) // Ensure tests are run before generating the report reports { - xml.required = false + xml.isEnabled = true // Enable XML report + html.isEnabled = true // Enable HTML report } } @@ -74,4 +76,5 @@ dependencies { tasks.withType { useJUnitPlatform() + finalizedBy(tasks.jacocoTestReport) // Run JaCoCo report after tests } \ No newline at end of file -- 2.45.2 From 08144b7a5910cd69f59fddc44751b44047f14d2b Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 15:02:52 +0000 Subject: [PATCH 13/15] Update build.gradle.kts --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3449e0d..12eda3d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -10,8 +10,8 @@ plugins { tasks.jacocoTestReport { dependsOn(tasks.test) // Ensure tests are run before generating the report reports { - xml.isEnabled = true // Enable XML report - html.isEnabled = true // Enable HTML report + xml.required = true + csv.required = true } } -- 2.45.2 From 8fbb1c62cdd5d8ad94279936a90d20036397bc28 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 15:09:43 +0000 Subject: [PATCH 14/15] Update .gitea/workflows/build.yml --- .gitea/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1506189..4321e8d 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -4,8 +4,6 @@ on: push: branches: - main - - fix/sonarqube - jobs: build: -- 2.45.2 From f0b8da882f897b9b13eab03d7a0a7139f02491b6 Mon Sep 17 00:00:00 2001 From: Jan Gleytenhoover Date: Wed, 25 Sep 2024 15:14:22 +0000 Subject: [PATCH 15/15] Update Readme.md --- Readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Readme.md b/Readme.md index 1874b0a..8774ce3 100644 --- a/Readme.md +++ b/Readme.md @@ -3,6 +3,9 @@ ![Gitea Release](https://img.shields.io/gitea/v/release/jank/LF8?gitea_url=https%3A%2F%2Fgit.kjan.de&style=plastic) ![Gitea Last Commit](https://img.shields.io/gitea/last-commit/jank/LF8?gitea_url=https%3A%2F%2Fgit.kjan.de&style=plastic) +## Code analysis coverage issues and results of linting MAY be found here: +https://sonarqube.kjan.de/dashboard?id=LF8&codeScope=overall + # Starter für das LF08 Projekt ## Requirements -- 2.45.2