File tree Expand file tree Collapse file tree 1 file changed +7
-22
lines changed Expand file tree Collapse file tree 1 file changed +7
-22
lines changed Original file line number Diff line number Diff line change 1- name : Java CI
2-
3- on :
4- - push
5- - pull_request
6-
7- jobs :
8- build :
9- runs-on : ubuntu-latest
10-
11- steps :
121name : SonarQube
132on :
143 push :
@@ -22,18 +11,13 @@ jobs:
2211 runs-on : ubuntu-latest
2312 steps :
2413 - uses : actions/checkout@v4
25- - uses : actions/setup-java@v4
2614 with :
27- java-version : ' 21'
28- distribution : ' temurin'
29- - name : Setup Gradle
30- uses : gradle/actions/setup-gradle@v4
15+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
16+ - name : Set up JDK 17
17+ uses : actions/setup-java@v4
3118 with :
32- fetch-depth : 0
33- - name : Execute Gradle build
34- run : ./gradlew build
35- - name : Generate coverage report
36- run : make report
19+ java-version : 17
20+ distribution : ' zulu' # Alternative distribution options are available
3721 - name : Cache SonarQube packages
3822 uses : actions/cache@v4
3923 with :
4731 key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
4832 restore-keys : ${{ runner.os }}-gradle
4933 - name : Build and analyze
34+ working-directory : ./app
5035 env :
5136 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
52- run : cd app && ./gradlew build sonar -info
37+ run : ./gradlew build sonar - -info
You can’t perform that action at this time.
0 commit comments