File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 44 branches-ignore :
55 - master
66 pull_request :
7-
7+ types : [opened, synchronize, reopened]
88jobs :
99 validation :
1010 name : Gradle Wrapper Validation
Original file line number Diff line number Diff line change 6666 BINTRAY_USER : ${{ secrets.BINTRAY_USER }}
6767 BINTRAY_PASS : ${{ secrets.BINTRAY_PASSWORD }}
6868 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 {
4646 property " sonar.projectKey" , " graphql-java-kickstart_graphql-java-servlet"
4747 property " sonar.organization" , " graphql-java-kickstart"
4848 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"
5050 }
5151}
5252
You can’t perform that action at this time.
0 commit comments