diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index a1fb952..aa47f32 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -41,6 +41,15 @@ jobs: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn clean package jacoco:report - name: Analyze with SonarQube # You can pin the exact commit or the version. @@ -57,6 +66,9 @@ jobs: # mandatory -Dsonar.projectKey=Kilowatt-Commando_controller-service -Dsonar.organization=kilowatt-commando + -Dsonar.java.binaries=target/classes + -Dsonar.tests=src/test/ + -Dsonar.sources=src/main # Comma-separated paths to directories containing main source files. #-Dsonar.sources= # optional, default is project base directory # When you need the analysis to take place in a directory other than the one from which it was launched diff --git a/README.md b/README.md index 21d1b77..f7da45f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ # Powerplant Controller Service +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Kilowatt-Commando_controller-service&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Kilowatt-Commando_controller-service) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Kilowatt-Commando_controller-service&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Kilowatt-Commando_controller-service) + +[![SonarQube Cloud](https://sonarcloud.io/images/project_badges/sonarcloud-highlight.svg)](https://sonarcloud.io/summary/new_code?id=Kilowatt-Commando_controller-service) + This repository contains the controller microservice. ## Testcontainers @@ -32,4 +37,4 @@ docker run \ -e KAFKA_BROKER= \ -e KAFKA_BROKER_PORT= \ kwkmdo-controller -``` \ No newline at end of file +```