This is an automated email from the ASF dual-hosted git repository.

zhaojinchao 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 69c555044f5 Refactor : refactor the sonar param (#25558)
69c555044f5 is described below

commit 69c555044f52ce09db1ae81d9ae312f6c488f6c8
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Wed May 10 22:04:58 2023 +0800

    Refactor : refactor the sonar param (#25558)
    
    Co-authored-by: shardingsphere <[email protected]>
---
 .github/workflows/check-sonarcloud.yml | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/check-sonarcloud.yml 
b/.github/workflows/check-sonarcloud.yml
index 516add2bf7f..1614c213b7c 100644
--- a/.github/workflows/check-sonarcloud.yml
+++ b/.github/workflows/check-sonarcloud.yml
@@ -37,30 +37,36 @@ env:
   CACHE_PREFIX: shardingsphere
 
 jobs:
-  build:
+  analyze-sonarcloud:
     if: github.repository == 'apache/shardingsphere'
     name: Analyze to SonarCloud
     runs-on: ubuntu-latest
+    timeout-minutes: 40
     steps:
       - uses: actions/checkout@v3
         with:
           fetch-depth: 0
-      - uses: actions/setup-java@v3
+      - name: Set up JDK 11
+        uses: actions/setup-java@v3
         with:
-          distribution: 'temurin'
           java-version: 11
-      - uses: actions/cache@v3
+          distribution: 'temurin'
+      - name: Cache SonarCloud packages
+        uses: actions/cache@v3
         with:
           path: ~/.sonar/cache
           key: ${{ runner.os }}-sonar
           restore-keys: ${{ runner.os }}-sonar
-      - uses: actions/cache@v3
+      - name: Cache Maven packages
+        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: Analyze
+      - name: Build and analyze
         env:
+          MAVEN_OPTS: "-XX:+UseG1GC -XX:InitialHeapSize=2g -XX:MaxHeapSize=6g 
-XX:+UseStringDeduplication"
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        run: ./mvnw -B verify 
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.login=${{ 
secrets.SONAR_TOKEN }} -Dsonar.projectKey=apache_shardingsphere 
-Dmaven.javadoc.skip=true -Drat.skip=true -Djacoco.skip=true -DskipTests
+          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+        run: ./mvnw -B verify 
org.sonarsource.scanner.maven:sonar-maven-plugin:sonar 
-Dsonar.projectKey=apache_shardingsphere -Dmaven.javadoc.skip=true 
-Drat.skip=true -Djacoco.skip=true -DskipTests

Reply via email to