Skip to content

Commit

Permalink
this time it will work 4 to add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RedouaneBALI committed Sep 22, 2024
1 parent be2d547 commit 41878a3
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ jobs:
java-version: '21'
distribution: 'adopt'

- name: Build with Maven
run: mvn clean install -DskipTests
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build and test with Maven
run: mvn clean verify org.jacoco:jacoco-maven-plugin:report

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -40,4 +48,10 @@ jobs:
-Dsonar.projectKey=RedouaneBALI_top-teams
-Dsonar.organization=redouanebali
-Dsonar.java.binaries=target/classes
-Dsonar.java.test.binaries=target/test-classes
-Dsonar.java.libraries=/home/runner/.m2/repository/**/*.jar
-Dsonar.java.test.libraries=/home/runner/.m2/repository/**/*.jar
-Dsonar.junit.reportPaths=target/surefire-reports
-Dsonar.java.coveragePlugin=jacoco
-Dsonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
-Dsonar.qualitygate.wait=true

0 comments on commit 41878a3

Please sign in to comment.