You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2024/08/23 02:56:49 UTC

(shardingsphere) branch master updated: Refactor : update jacoco check workflow (#32638)

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

zhaojinchao 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 72b20ee3619 Refactor : update jacoco check workflow (#32638)
72b20ee3619 is described below

commit 72b20ee3619b08219c52833e2c2b32dfa22e8c65
Author: 孙念君 Nianjun Sun <su...@apache.org>
AuthorDate: Fri Aug 23 10:56:43 2024 +0800

    Refactor : update jacoco check workflow (#32638)
    
    * Refactor : update jacoco check workflow
    
    * Remove : remove useless workflow
---
 .github/workflows/jacoco.yml        | 47 -------------------------------------
 .github/workflows/nightly-check.yml | 18 ++++----------
 2 files changed, 5 insertions(+), 60 deletions(-)

diff --git a/.github/workflows/jacoco.yml b/.github/workflows/jacoco.yml
deleted file mode 100644
index b2dc2d8e0e4..00000000000
--- a/.github/workflows/jacoco.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Coverage
-
-on: [push, pull_request]
-
-jobs:
-  build:
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-        with:
-          persist-credentials: false
-
-      - 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 -T1C
-
-      - name: Set up JDK 8 for Jacoco
-        uses: actions/setup-java@v4
-        with:
-          distribution: temurin
-          java-version: 8
-          cache: 'maven'
-
-      - name: Build with Maven and Run Code Coverage Merge 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 }}
-
-      - name: Upload coverage reports to Codecov
-        uses: codecov/codecov-action@v4
-        with:
-          token: ${{ secrets.CODECOV_TOKEN }}
-          files: ${{ github.workspace }}/target/mergeReport/jacoco.xml
\ No newline at end of file
diff --git a/.github/workflows/nightly-check.yml b/.github/workflows/nightly-check.yml
index eb0170a8a3a..9889c3cd412 100644
--- a/.github/workflows/nightly-check.yml
+++ b/.github/workflows/nightly-check.yml
@@ -215,23 +215,19 @@ jobs:
           sed -i '/<requireMavenVersion>/i \                                    <dependencyConvergence/>' pom.xml
           ./mvnw clean install -DskipTests -T1C -Dmaven.enforcer.fail=true
 
-  codecov-jacoco:
+  check-and-report-jacoco:
     if: github.repository == 'apache/shardingsphere'
-    name: Check - JacocoReport to CodeCov
+    name: Check - Jacoco
     needs: global-environment
     runs-on: ubuntu-latest
     timeout-minutes: 80
     steps:
       - uses: actions/checkout@v4
-        with:
-          persist-credentials: false
-
       - name: Setup JDK 11
         uses: actions/setup-java@v4
         with:
           distribution: temurin
           java-version: 11
-
       - uses: actions/cache@v4
         with:
           path: ~/.m2/repository
@@ -239,25 +235,21 @@ jobs:
           restore-keys: |
             shardingsphere-maven-third-party-e2e-cache-
             shardingsphere-maven-third-party-
-
       - name: Install Project
         run: ./mvnw clean install -T1C
-
       - name: Set up JDK 8 for Jacoco
         uses: actions/setup-java@v4
         with:
           distribution: temurin
           java-version: 8
           cache: 'maven'
-
-      - name: Build with Maven and Run Code Coverage Merge Script
+      - 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 }}
-
-      - name: Upload coverage reports to Codecov
+      - name: Upload coverage reports to codecov
         uses: codecov/codecov-action@v4
         with:
           token: ${{ secrets.CODECOV_TOKEN }}
-          files: ${{ github.workspace }}/target/mergeReport/jacoco.xml
\ No newline at end of file
+          files: ${{ github.workspace }}/target/mergeReport/jacoco.xml