File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SonarQube
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+
9+ jobs :
10+ sonarqube :
11+ name : SonarQube
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+ with :
17+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
18+ - name : Set up JDK 17
19+ uses : actions/setup-java@v4
20+ with :
21+ java-version : 17
22+ distribution : ' zulu' # Alternative distribution options are available.
23+ - name : Cache SonarQube packages
24+ uses : actions/cache@v4
25+ with :
26+ path : ~/.sonar/cache
27+ key : ${{ runner.os }}-sonar
28+ restore-keys : ${{ runner.os }}-sonar
29+ - name : Cache Gradle packages
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.gradle/caches
33+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
34+ restore-keys : ${{ runner.os }}-gradle
35+ - name : Build and analyze
36+ env :
37+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
38+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
39+ run : ./gradlew build sonar --info
You can’t perform that action at this time.
0 commit comments