This is an automated email from the ASF dual-hosted git repository.
panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new f50f5e9991b Add : add checkstyle report to sonarcloud (#25775)
f50f5e9991b is described below
commit f50f5e9991bd5759c92b82ee89bf2663b4142119
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Fri May 19 09:45:25 2023 +0800
Add : add checkstyle report to sonarcloud (#25775)
---
.github/workflows/nightly-check.yml | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/.github/workflows/nightly-check.yml
b/.github/workflows/nightly-check.yml
index 15d400d46db..ed675e476d1 100644
--- a/.github/workflows/nightly-check.yml
+++ b/.github/workflows/nightly-check.yml
@@ -103,3 +103,34 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
run: ./mvnw -B sonar:sonar -Dsonar.projectKey=apache_shardingsphere
-Dsonar.coverage.jacoco.xmlReportPaths=report/target/site/jacoco-aggregate/jacoco.xml
-Dmaven.javadoc.skip=true -Drat.skip=true
+
+ checkstyle-report-sonarcloud:
+ if: github.repository == 'apache/shardingsphere'
+ name: Checkstyle - SonarCloud
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-java@v3
+ with:
+ java-version: 11
+ distribution: 'temurin'
+ - uses: actions/cache@v3
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - uses: actions/cache@v3
+ with:
+ path: ~/.m2/repository
+ key: ${{ env.CACHE_PREFIX }}-maven-third-party-${{
hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ env.CACHE_PREFIX }}-maven-third-party-
+ - name: Aggregate checkstyle report
+ run:
+ ./mvnw clean checkstyle:checkstyle-aggregate
+ - name: Upload checkstyle report to SonarCloud
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+ run: ./mvnw -B sonar:sonar -Dsonar.projectKey=apache_shardingsphere
-Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml