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 2020/11/16 04:11:14 UTC
[iotdb] 04/04: Add Sonar and Coveralls Check using Github Action
(#2052)
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch rel/0.11
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit ab5d35b9ee504c56833eca7be898cf2cf04ac621
Author: Xiangdong Huang <hx...@apache.org>
AuthorDate: Sun Nov 15 16:58:33 2020 +0800
Add Sonar and Coveralls Check using Github Action (#2052)
---
.github/workflows/sonar_and_coverall.yml | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/sonar_and_coverall.yml b/.github/workflows/sonar_and_coverall.yml
index 02883b6..f3d85dd 100644
--- a/.github/workflows/sonar_and_coverall.yml
+++ b/.github/workflows/sonar_and_coverall.yml
@@ -19,6 +19,34 @@ on:
- 'docs/**'
jobs:
+ sonar:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up JDK 11.0.x
+ uses: actions/setup-java@v1
+ with:
+ java-version: 11.0.x
+ - name: Cache Maven packages
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: sonar-${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: SonarCloud Test
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SONAR_TOKEN: '2d9c9a58d772a57806a168e00181e3e19f2763dc'
+ run: |
+ mvn -B verify sonar:sonar \
+ -Dsonar.organization=apache \
+ -Dsonar.projectKey=apache_incubator-iotdb \
+ -Dsonar.host.url=https://sonarcloud.io \
+ -Dsonar.login=${{ env.SONAR_TOKEN }} \
+ -DskipTests -pl '!distribution' -am
+
coveralls:
runs-on: ubuntu-latest
strategy:
@@ -41,7 +69,7 @@ jobs:
run: |
mvn -B coveralls:report \
--no-transfer-progress \
- -DserviceName=github \
+ -DserviceName=travis_ci \
-D branch=$BRANCH_NAME \
-D pullRequest=$PR_NUMBER \
-D repoToken=MiEOlMMMNQhLNV4yayn7rRUPyVSQzbzbZ \