File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,20 @@ jobs:
2727 analyze :
2828 runs-on : ubuntu-latest
2929 steps :
30- - uses : actions/checkout@v2
30+ - name : Checkout
31+ uses : actions/checkout@v2
32+ - name : Setup java
33+ uses : actions/setup-java@v2
3134 with :
32- # Disabling shallow clone is recommended for improving relevancy of reporting
33- fetch-depth : 0
34- - name : SonarCloud Scan
35- uses : sonarsource/sonarcloud-github-action@master
35+ java-version : ' 8'
36+ distribution : ' adopt'
37+ - name : Cache Maven packages
38+ uses : actions/cache@v2
39+ with :
40+ path : ~/.m2
41+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
42+ restore-keys : ${{ runner.os }}-m2
43+ - name : Analyze with SonarCloud
44+ run : mvn -B clean verify sonar:sonar -Dsonar.login=${{ secrets.SONAR_TOKEN }}
3645 env :
3746 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38- SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
You can’t perform that action at this time.
0 commit comments