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

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

commit 221c274e361ed05c6f4184873132c8906d544f28
Author: HTHou <[email protected]>
AuthorDate: Sat Feb 28 09:59:04 2026 +0800

    test
---
 .github/workflows/sonar.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
new file mode 100644
index 00000000000..9ba7c2912fd
--- /dev/null
+++ b/.github/workflows/sonar.yml
@@ -0,0 +1,57 @@
+# This workflow will build a Java project with Maven
+# For more information see: 
https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+
+name: Sonar-Codecov
+
+on:
+  push:
+    branches:
+      - tes_sonar
+    paths-ignore:
+      - "docs/**"
+      - "site/**"
+  # allow manually run the action:
+  workflow_dispatch:
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+env:
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3
+  MAVEN_ARGS: --batch-mode --no-transfer-progress
+  PR_NUMBER: ${{ github.event.number }}
+  DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
+
+jobs:
+
+  sonar:
+    runs-on: ubuntu-latest
+    if: github.event_name == 'pull_request' && 
github.event.pull_request.head.repo.full_name == 'apache/iotdb' || 
github.event_name == 'push'
+    steps:
+      - uses: actions/checkout@v4
+      - name: Set up JDK 17
+        uses: actions/setup-java@v4
+        with:
+          distribution: corretto
+          java-version: 17
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+      - name: Cache Maven packages
+        uses: actions/cache@v4
+        with:
+          path: ~/.m2
+          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+          restore-keys: ${{ runner.os }}-m2-
+      - name: test1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+        run: |
+          curl -u ${{ secrets.SONARCLOUD_TOKEN }}: 
https://sonarcloud.io/api/users/current
+      - name: test2
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+        run: |
+          curl -u ${{ secrets.SONARCLOUD_TOKEN }}: 
"https://sonarcloud.io/api/permissions/groups?organization=apache&projectKey=apache_iotdb";

Reply via email to