You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2021/03/14 01:03:08 UTC

[iotdb] branch master updated: Skip code coverage and sonar reports in a forked pull request

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

hxd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new b692da0  Skip code coverage and sonar reports in a forked pull request
b692da0 is described below

commit b692da0315870a63c5f3845619cd5f0c647c0d4f
Author: baijian <ba...@p1.com>
AuthorDate: Thu Mar 11 14:19:50 2021 +0800

    Skip code coverage and sonar reports in a forked pull request
---
 .github/workflows/sonar-coveralls.yml | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/sonar-coveralls.yml b/.github/workflows/sonar-coveralls.yml
index c341f55..48a3fbb 100644
--- a/.github/workflows/sonar-coveralls.yml
+++ b/.github/workflows/sonar-coveralls.yml
@@ -7,16 +7,16 @@ on:
   push:
     branches:
       - master
-      - 'rel/*'
+      - "rel/*"
     paths-ignore:
-      - 'docs/**'
+      - "docs/**"
   pull_request:
     branches:
       - master
-      - 'rel/*'
+      - "rel/*"
       - cluster_new
     paths-ignore:
-      - 'docs/**'
+      - "docs/**"
   # allow manually run the action:
   workflow_dispatch:
 
@@ -38,9 +38,9 @@ jobs:
           restore-keys: ${{ runner.os }}-m2-
       - name: IT/UT Test
         # we do not compile client-cpp for saving time, it is tested in client.yml
-        run:  mvn -B clean post-integration-test -Dtest.port.closed=true -Pcode-coverage
+        run: mvn -B clean post-integration-test -Dtest.port.closed=true -Pcode-coverage
       - name: Code Coverage (Coveralls)
-        if: ${{ success() && github.repository == 'apache/iotdb'}}
+        if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push') }}
         run: |
           mvn -B post-integration-test -Pcode-coverage -pl code-coverage
           mvn -B coveralls:report \
@@ -50,7 +50,7 @@ jobs:
           -DrepoToken=${{ secrets.COVERALL_TOKEN }} \
           -Pcode-coverage
       - name: SonarCloud Report
-        if: ${{ success() && github.repository == 'apache/iotdb'}}
+        if: ${{ success() && (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'apache/iotdb' || github.event_name == 'push') }}
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}