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

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


The following commit(s) were added to refs/heads/master by this push:
     new d7b5b97a0 Updating the Github CI/CD actions to have automated unit 
tests reporting.. (#2727)
d7b5b97a0 is described below

commit d7b5b97a08497fa185e9d3e082c0b54e03736fd2
Author: Himanshu Kandwal <[email protected]>
AuthorDate: Tue Jan 16 11:12:26 2024 -0800

    Updating the Github CI/CD actions to have automated unit tests reporting.. 
(#2727)
    
    * [apache/helix] -- Updated GitHub actions file to generate unit tests 
reports.
---
 .github/workflows/Helix-CI.yml        | 18 +++++++++++++++++-
 .github/workflows/Helix-Manual-CI.yml | 23 ++++++++++++++++++-----
 2 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/Helix-CI.yml b/.github/workflows/Helix-CI.yml
index 556c079c2..fc837116b 100644
--- a/.github/workflows/Helix-CI.yml
+++ b/.github/workflows/Helix-CI.yml
@@ -5,6 +5,8 @@ on:
   schedule:
     - cron: '0 */12 * * *'
 
+permissions: write-all
+
 jobs:
   Merge_PR_CI:
 
@@ -25,10 +27,24 @@ jobs:
     - name: Upload to Codecov
       run: bash <(curl -s https://codecov.io/bash)
       if: ${{ github.repository == 'apache/helix' && github.event_name == 
'push' && (success() || failure()) }}
+    - name: Generate Test Report
+      uses: dorny/test-reporter@v1
+      if: ${{ success() || failure() }}
+      with:
+        name: Tests Results
+        path: './**/target/surefire-reports/TEST-TestSuite.xml'
+        reporter: java-junit
+    - name: Upload Unit Test Results as Artifacts
+      if: failure()
+      uses: actions/upload-artifact@v2
+      with:
+        name: surefire-reports
+        path: ./**/target/surefire-reports/
+        if-no-files-found: ignore
     - name: Print Tests Results
       run: .github/scripts/printTestResult.sh
       if: ${{ success() || failure() }}
-    - name: Report Tests Results
+    - name: Report Failed Tests as GitHub Issues
       uses: actions/github-script@v4
       with:
         github-token: ${{secrets.GITHUB_TOKEN}}
diff --git a/.github/workflows/Helix-Manual-CI.yml 
b/.github/workflows/Helix-Manual-CI.yml
index f349e3303..f14b86241 100644
--- a/.github/workflows/Helix-Manual-CI.yml
+++ b/.github/workflows/Helix-Manual-CI.yml
@@ -15,6 +15,8 @@ on:
         required: true
         default: -fae test
 
+permissions: write-all
+
 jobs:
   MANUAL_CI:
 
@@ -24,16 +26,27 @@ jobs:
       - uses: actions/checkout@v2
         with:
           ref: ${{ github.event.inputs.buildRef }}
-      - name: Set up JDK 1.8
+      - name: Set up JDK 11
         uses: actions/setup-java@v1
         with:
-          java-version: 1.8
+          java-version: 11
       - name: Delete frontend-maven-plugin dir
         run: rm -rf .m2\repository\com\github\eirslett
       - name: Build with Maven
         run: mvn clean install -Dmaven.test.skip.exec=true 
-DretryFailedDeploymentCount=5
       - name: Run All Tests
         run: mvn -B -V -e -ntp "-Dstyle.color=always" ${{ 
github.event.inputs.mvnOpts }} ${{ github.event.inputs.goals }}
-      - name: Print Tests Results
-        run: .github/scripts/printTestResult.sh
-        if: ${{ success() || failure() }}
+      - name: Test Report
+        uses: dorny/test-reporter@v1
+        if: always()
+        with:
+          name: Tests Results
+          path: './**/target/surefire-reports/TEST-TestSuite.xml'
+          reporter: java-junit
+      - name: Upload unit test results
+        if: failure()
+        uses: actions/upload-artifact@v2
+        with:
+          name: surefire-reports
+          path: ./**/target/surefire-reports/
+          if-no-files-found: ignore

Reply via email to