File tree Expand file tree Collapse file tree 1 file changed +11
-20
lines changed Expand file tree Collapse file tree 1 file changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -25,36 +25,27 @@ jobs:
2525 fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
2626
2727 - name : Set up JDK 11
28- uses : actions/setup-java@v3
28+ uses : actions/setup-java@v4
2929 with :
3030 distribution : ' temurin'
3131 java-version : 11
3232
33+ - name : Cache SonarQube packages
34+ uses : actions/cache@v4
35+ with :
36+ path : ~/.sonar/cache
37+ key : ${{ runner.os }}-sonar
38+ restore-keys : ${{ runner.os }}-sonar
39+
3340 - name : Cache Maven packages
3441 uses : actions/cache@v3
3542 with :
3643 path : ~/.m2
3744 key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
3845 restore-keys : ${{ runner.os }}-m2
3946
40- - name : Verify
41- run : mvn -e -B verify
42-
43- - name : Set up JDK 17
44- uses : actions/setup-java@v3
45- with :
46- distribution : ' temurin'
47- java-version : 17
48-
49- - name : Cache SonarQube packages
50- uses : actions/cache@v3
51- with :
52- path : ~/.sonar/cache
53- key : ${{ runner.os }}-sonar
54- restore-keys : ${{ runner.os }}-sonar
55-
56- - name : SonarQube Scan
47+ - name : Build and analyze
5748 env :
58- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
5950 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
60- run : mvn -e -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-python
51+ run : mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=green-code-initiative_creedengo-python
You can’t perform that action at this time.
0 commit comments