File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -91,25 +91,29 @@ jobs:
9191 steps :
9292 - uses : actions/checkout@v4
9393 with :
94- # Disabling shallow clone is recommended for improving relevancy of reporting
95- fetch-depth : 0
94+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
9695 - name : Set up JDK 17
9796 uses : actions/setup-java@v4
9897 with :
9998 distribution : ' temurin'
10099 java-version : 17
100+ - name : Cache SonarQube packages
101+ uses : actions/cache@v4
102+ with :
103+ path : ~/.sonar/cache
104+ key : ${{ runner.os }}-sonar
105+ restore-keys : ${{ runner.os }}-sonar
101106 - name : Cache Maven Dependencies
102107 uses : actions/cache@v4
103108 with :
104- path : ~/.m2/repository
105- key : ares-maven -${{ hashFiles('**/pom.xml') }}
109+ path : ~/.m2
110+ key : ${{ runner.os }}-m2 -${{ hashFiles('**/pom.xml') }}
106111 restore-keys : |
107112 ares-maven-
108- - name : Run SonarScanner for SonarCloud
113+ - name : Build and analyze for SonarCloud
109114 env :
110- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
111115 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
112- run : mvn -B -P coverage clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=artemis-java-test-sandbox -Dsonar.organization=maisikoleni -Dsonar.host.url=https://sonarcloud.io
116+ run : mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=ls1intum_Ares
113117 deploy :
114118 if : startsWith(github.event.ref, 'refs/tags/')
115119 needs : [code-style, test, test-gradle]
You can’t perform that action at this time.
0 commit comments