From f7123f457d4b158679afa27c4b96248751c7a7ec Mon Sep 17 00:00:00 2001 From: Jorge Bornhausen Date: Mon, 11 Nov 2024 18:36:06 +0100 Subject: [PATCH] ci(forgejo-actions): analyze project with sonarqube --- .gitea/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index fe95ecf..b98dbd3 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -8,6 +8,8 @@ jobs: steps: - name: Checkout the code uses: https://github.com/actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Set up JDK 21 uses: https://github.com/actions/setup-java@v4 @@ -35,7 +37,10 @@ jobs: run: chmod +x mvnw - name: Build and run tests - run: ./mvnw verify + run: ./mvnw verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=quarkus-commons -Dsonar.projectName='quarkus-commons' -Dsonar.coverage.jacoco.xmlReportPaths=../**/target/jacoco-report/jacoco.xml + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - name: Upload libs to Gitea Maven Registry if: gitea.ref == 'refs/heads/main'