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

mmuzaf pushed a commit to branch ignite-19178-fix
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 427372cce137d9c0bdf7dffb74b1ea0fa86f0cd7
Author: Maxim Muzafarov <[email protected]>
AuthorDate: Fri Apr 7 13:59:27 2023 +0200

    pr
---
 .github/workflows/commit-check.yml | 56 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/.github/workflows/commit-check.yml 
b/.github/workflows/commit-check.yml
index c307f04901d..54aa2d47e12 100644
--- a/.github/workflows/commit-check.yml
+++ b/.github/workflows/commit-check.yml
@@ -69,6 +69,62 @@ jobs:
         run : |
           ./mvnw test -Pcheck-test-suites,all-java,all-scala,scala -B -V
 
+  sonarcloud-pr-analysis:
+    name: Sonar Pull Request Analysis
+    needs: check-java
+    if: ${{ github.event_name == 'pull-request' }}
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+        with:
+          fetch-depth: 0
+
+      - name: Set up JDK11
+        uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: '11'
+          cache: 'maven'
+
+      - name: Cache SonarCloud packages
+        uses: actions/cache@v3
+        with:
+          path: ~/.sonar/cache
+          key: ${{ runner.os }}-sonar
+          restore-keys: ${{ runner.os }}-sonar
+
+      - name: Cache local Maven repository
+        uses: actions/cache@v3
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-m2
+
+      - name: Install Libnuma
+        run: sudo apt-get update && sudo apt-get install libnuma-dev
+
+      - name: Build with Maven
+        run: |
+          ./mvnw clean install -P all-java,lgpl,examples,skip-docs -DskipTests 
-B -V          
+
+      - name: Sonar Analyze Upload
+        run: >
+          ./mvnw org.sonarsource.scanner.maven:sonar-maven-plugin:sonar 
+          -P all-java,lgpl,examples,skip-docs
+          -Dsonar.pullrequest.branch=${{ github.head_ref }}
+          -Dsonar.pullrequest.base=${{ github.base_ref }}
+          -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
+          -Dsonar.pullrequest.github.repository=apache/ignite
+          -Dsonar.pullrequest.provider=GitHub 
+          -Dsonar.pullrequest.github.summary_comment=true
+          -Dsonar.projectKey=apache_ignite
+          -Dsonar.login=${SONARCLOUD_TOKEN}
+          -B -V
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }}
+
   sonarcloud:
     name: Sonar Quality Branch Analysis
     needs: check-java

Reply via email to