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

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


The following commit(s) were added to refs/heads/master by this push:
     new cc47db793 [Improve] Fix cannot upload test report in the PR (#2748)
cc47db793 is described below

commit cc47db793f0d6ffa744b05f6c53bd639830ec34a
Author: crossoverJie <[email protected]>
AuthorDate: Wed Sep 25 22:25:45 2024 +0800

    [Improve] Fix cannot upload test report in the PR (#2748)
    
    Co-authored-by: Zhang Yuxuan <[email protected]>
    Co-authored-by: shown <[email protected]>
    Co-authored-by: aias00 <[email protected]>
---
 ...build-test.yml => backend-build-test-reuse.yml} | 22 ++++--------
 .github/workflows/backend-build-test.yml           | 42 ++--------------------
 2 files changed, 9 insertions(+), 55 deletions(-)

diff --git a/.github/workflows/backend-build-test.yml 
b/.github/workflows/backend-build-test-reuse.yml
similarity index 87%
copy from .github/workflows/backend-build-test.yml
copy to .github/workflows/backend-build-test-reuse.yml
index 7202646eb..a7e796b05 100644
--- a/.github/workflows/backend-build-test.yml
+++ b/.github/workflows/backend-build-test-reuse.yml
@@ -21,22 +21,11 @@
 name: Backend CI
 
 on:
-  push:
-    branches: [ master, dev, action* ]
-    paths-ignore:
-      - '**.md'
-      - 'home/**'
-      - 'web-app/**'
-      - 'script/**'
-      - 'material/**'
-  pull_request:
-    branches: [ master, dev ]
-    paths-ignore:
-      - '**.md'
-      - 'home/**'
-      - 'web-app/**'
-      - 'script/**'
-      - 'material/**'
+  workflow_call:
+    secrets:
+      codecov_token:
+        required: true
+  workflow_dispatch:
 
 jobs:
   backend-build:
@@ -52,6 +41,7 @@ jobs:
       uses: codecov/[email protected]
       with:
         token: ${{ secrets.CODECOV_TOKEN }}
+        verbose: true
 
     - name: Build Image
       uses: docker/build-push-action@v3
diff --git a/.github/workflows/backend-build-test.yml 
b/.github/workflows/backend-build-test.yml
index 7202646eb..410ea2e29 100644
--- a/.github/workflows/backend-build-test.yml
+++ b/.github/workflows/backend-build-test.yml
@@ -40,42 +40,6 @@ on:
 
 jobs:
   backend-build:
-    runs-on: ubuntu-latest
-    steps:
-    - uses: actions/checkout@v4
-    - uses: ./script/ci/github-actions/setup-deps
-
-    - name: Build with Maven
-      run: mvn clean -B package -Prelease --file pom.xml
-
-    - name: Upload coverage reports to Codecov
-      uses: codecov/[email protected]
-      with:
-        token: ${{ secrets.CODECOV_TOKEN }}
-
-    - name: Build Image
-      uses: docker/build-push-action@v3
-      with:
-        context: ./dist
-        file: ./script/docker/server/Dockerfile
-        push: false
-        tags: apache/hertzbeat:test
-
-    - name: Run E2E
-      run: |
-        sudo curl -L 
https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-linux-x86_64
 -o /usr/local/bin/docker-compose
-        sudo chmod u+x /usr/local/bin/docker-compose
-        
-        cd e2e
-        sudo docker-compose version
-        sudo docker-compose up --exit-code-from testing --remove-orphans
-
-    # upload application logs
-    - name: Upload logs & API test reports
-      uses: actions/upload-artifact@v3
-      if: always()
-      with:
-        name: hz-logs-${{ github.run_id }}
-        path: |
-          e2e/logs/
-          e2e/report/
+    uses: ./.github/workflows/backend-build-test-reuse.yml
+    secrets:
+      codecov_token: ${{ secrets.CODECOV_TOKEN }}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to