File tree 3 files changed +31
-2
lines changed
3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 4
4
branches-ignore :
5
5
- master
6
6
pull_request :
7
-
7
+ types : [opened, synchronize, reopened]
8
8
jobs :
9
9
validation :
10
10
name : Gradle Wrapper Validation
Original file line number Diff line number Diff line change 66
66
BINTRAY_USER : ${{ secrets.BINTRAY_USER }}
67
67
BINTRAY_PASS : ${{ secrets.BINTRAY_PASSWORD }}
68
68
run : ./gradlew artifactoryPublish -Dsnapshot=true -Dbuild.number=${{ env.GITHUB_RUN_NUMBER }}
69
+ sonar :
70
+ name : Sonar analysis
71
+ needs : validation
72
+ runs-on : ubuntu-latest
73
+ steps :
74
+ - uses : actions/checkout@v2
75
+ with :
76
+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
77
+ - name : Set up JDK 11
78
+ uses : actions/setup-java@v1
79
+ with :
80
+ java-version : 11
81
+ - name : Cache SonarCloud packages
82
+ uses : actions/cache@v1
83
+ with :
84
+ path : ~/.sonar/cache
85
+ key : ${{ runner.os }}-sonar
86
+ restore-keys : ${{ runner.os }}-sonar
87
+ - name : Cache Gradle packages
88
+ uses : actions/cache@v1
89
+ with :
90
+ path : ~/.gradle/caches
91
+ key : ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
92
+ restore-keys : ${{ runner.os }}-gradle
93
+ - name : Build and analyze
94
+ env :
95
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
96
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
97
+ run : ./gradlew build sonarqube --info
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ sonarqube {
46
46
property " sonar.projectKey" , " graphql-java-kickstart_graphql-java-servlet"
47
47
property " sonar.organization" , " graphql-java-kickstart"
48
48
property " sonar.host.url" , " https://sonarcloud.io"
49
- property " sonar.coverage.jacoco.xmlReportPaths" , " $p rojectDir /*/ build/reports/jacoco/test/jacocoTestReport.xml"
49
+ property " sonar.coverage.jacoco.xmlReportPaths" , " build/reports/jacoco/test/jacocoTestReport.xml"
50
50
}
51
51
}
52
52
You can’t perform that action at this time.
0 commit comments