소스 검색

fix wrong sonar analysis with checkout V2. (#2148)

Jave-Chen 5 년 전
부모
커밋
ec93e70f2f
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9 1
      .github/workflows/ci_ut.yml

+ 9 - 1
.github/workflows/ci_ut.yml

@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-on: ["pull_request"]
+on: ["pull_request", "push"]
 env:
   DOCKER_DIR: ./docker
   LOG_DIR: /tmp/dolphinscheduler
@@ -52,7 +52,15 @@ jobs:
         run: |
           export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
           mvn test -B -Dmaven.test.skip=false
+      - name: Upload coverage report to codecov
+        if: github.event_name == 'pull_request'
+        run: |
           CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash)
+      - name: Git fetch unshallow
+        run: |
+          git fetch --unshallow
+          git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
+          git fetch origin
       - name: Run SonarCloud Analysis
         run: >
           mvn verify --batch-mode