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

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


The following commit(s) were added to refs/heads/master by this push:
     new ad7222f87d5 Refactor workflow (#33493)
ad7222f87d5 is described below

commit ad7222f87d535d1f18b5c5f341d2e8900b2f585e
Author: 孙念君 Nianjun Sun <sunnian...@apache.org>
AuthorDate: Fri Nov 1 12:38:10 2024 +0800

    Refactor workflow (#33493)
    
    * Refactor : update the workflow
    
    * Refactor : update the workflow condition
---
 .github/workflows/nightly-check.yml      | 63 +++++++++++++++++++++++++++++++-
 .github/workflows/nightly-ci-dynamic.yml | 12 +++---
 2 files changed, 68 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/nightly-check.yml 
b/.github/workflows/nightly-check.yml
index b8a490321ee..28eb912d877 100644
--- a/.github/workflows/nightly-check.yml
+++ b/.github/workflows/nightly-check.yml
@@ -165,7 +165,7 @@ jobs:
           stale-issue-message: >
             There hasn't been any activity on this issue recently, and in 
order to prioritize active issues, it will be
             marked as stale.
-  
+
   check-dependency-convergence:
     if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
     name: Check - Dependency Convergence
@@ -184,3 +184,64 @@ jobs:
         run: |
           sed -i '/<requireMavenVersion>/i \                                   
 <dependencyConvergence/>' pom.xml
           ./mvnw clean install -DskipTests -T1C -Dmaven.enforcer.fail=true
+
+  check-owasp:
+    if: ${{ needs.global-environment.outputs.GLOBAL_JOB_ENABLED == 'true' }}
+    name: Check - OWASP
+    needs: global-environment
+    runs-on: self-hosted-cluster
+    timeout-minutes: 40
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/cache@v4
+        with:
+          path: ~/.m2/repository
+          key: ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX 
}}-maven-third-party-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ needs.global-environment.outputs.GLOBAL_CACHE_PREFIX 
}}-maven-third-party-
+      - name: Run OWASP Check
+        # https://nvd.nist.gov/developers/request-an-api-key
+        run: ./mvnw clean dependency-check:aggregate -DnvdApiKey=${{ 
secrets.OWASP_NVD_API_KEY }} -DfailBuildOnCVSS=7 -DskipProvidedScope=true 
-DskipRuntimeScope=true
+      - uses: actions/upload-artifact@v4
+        if: always()
+        with:
+          name: Upload OWASP Check Report
+          path: ${{ github.workspace }}/target/dependency-check-report.html
+          retention-days: 5
+
+  check-and-report-jacoco:
+    if: github.repository == 'SphereEx/dbplus-engine'
+    name: Check - Jacoco
+    needs: global-environment
+    runs-on: self-hosted-cluster
+    timeout-minutes: 80
+    steps:
+      - uses: actions/checkout@v4
+      - name: Setup JDK 11
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: 11
+      - uses: actions/cache@v4
+        with:
+          path: ~/.m2/repository
+          key: shardingsphere-maven-third-party-e2e-cache-${{ github.sha }}
+          restore-keys: |
+            shardingsphere-maven-third-party-e2e-cache-
+            shardingsphere-maven-third-party-
+      - name: Install Project
+        run: ./mvnw clean install -DskipTests -T1C
+      - name: Set up JDK 8 for Jacoco
+        uses: actions/setup-java@v4
+        with:
+          distribution: temurin
+          java-version: 8
+      - name: Build with maven and execute jacoco aggregation script
+        run: |
+          ./mvnw --show-version --batch-mode --no-transfer-progress verify 
-Dmaven.test.failure.ignore=true -DfailIfNoTests=false 
-Dsurefire.failIfNoSpecifiedTests=false &&
+          chmod +x 
./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
 &&
+          
./.github/workflows/resources/scripts/unit-test-coverage-merge/code-coverage-merge.sh
 ${{ github.workspace }}
+      - uses: actions/upload-artifact@v4
+        with:
+          name: jacoco-report
+          path: ${{ github.workspace }}/target/mergeReport/jacoco
diff --git a/.github/workflows/nightly-ci-dynamic.yml 
b/.github/workflows/nightly-ci-dynamic.yml
index 984d5190260..d8ef7974c71 100644
--- a/.github/workflows/nightly-ci-dynamic.yml
+++ b/.github/workflows/nightly-ci-dynamic.yml
@@ -40,9 +40,9 @@ jobs:
   global-environment:
     name: Import Global Environment
     uses: ./.github/workflows/required-reusable.yml
-  
+
   ci-dynamic:
-    if: github.repository == 'apache/shardingsphere' && 
github.event.inputs.job == 'ci-dynamic'
+    if: github.event.inputs.job == 'ci-dynamic'
     name: CI - JDK ${{ matrix.java-version }} on ${{ matrix.os }}
     needs: global-environment
     runs-on: ${{ matrix.os }}
@@ -73,9 +73,9 @@ jobs:
         run: ./mvnw clean install -B -ntp -T1C
       - name: Build Examples with Maven
         run: ./mvnw clean package -B -f examples/pom.xml -T1C
-  
+
   ci-jdk8-dynamic:
-    if: github.repository == 'apache/shardingsphere' && 
github.event.inputs.job == 'ci-jdk8-dynamic'
+    if: github.event.inputs.job == 'ci-jdk8-dynamic'
     name: CI - JDK 8 on ${{ matrix.os }}
     needs: global-environment
     runs-on: ${{ matrix.os }}
@@ -110,9 +110,9 @@ jobs:
           java-version: 8
       - name: Run Tests with JDK 8
         run: ./mvnw test -B -ntp -fae -T1C
-  
+
   ci-native-test:
-    if: github.repository == 'apache/shardingsphere' && 
github.event.inputs.job == 'ci-native-test'
+    if: github.event.inputs.job == 'ci-native-test'
     name: NativeTest CI - GraalVM CE on ${{ matrix.os }}
     needs: global-environment
     runs-on: ${{ fromJson(github.event.inputs.os) }}

Reply via email to