Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr coverage insert into moc #150

Merged
merged 10 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/merge-update-moc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Merge and Update MOC
on:
workflow_call:
secrets:
EE_DB_ADDR:
description: "matrixone cloud host"
required: true
EE_DB_PORT:
description: "matrixone cloud port"
required: true
EE_DB_USER:
description: "matrixone cloud user"
required: true
EE_DB_PASSWORD:
description: "matrixone cloud password"
required: true
EE_DB_DB:
description: "matrixone cloud db"
required: true

jobs:
Update_MOC:
name: Update MOC
runs-on: ubuntu-latest
steps:
- name: Update MOC Data
uses: matrixorigin/CI/actions/check-coverage@main
with:
type: merged
commit_id: ${{ github.event.pull_request.head.sha }}
branch: 'main'
pr_number: ${{ github.event.pull_request.number }}
mo_host: ${{ secrets.EE_DB_ADDR }}
mo_port: ${{ secrets.EE_DB_PORT }}
mo_user: ${{ secrets.EE_DB_USER }}
mo_password: ${{ secrets.EE_DB_PASSWORD }}
mo_database: ${{ secrets.EE_DB_DB }}
30 changes: 30 additions & 0 deletions .github/workflows/utils.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ on:
TENCENT_SK:
description: "TENCENT_SK For UT Test"
required: true
EE_DB_ADDR:
description: "matrixone cloud host"
required: true
EE_DB_PORT:
description: "matrixone cloud port"
required: true
EE_DB_USER:
description: "matrixone cloud user"
required: true
EE_DB_PASSWORD:
description: "matrixone cloud password"
required: true
EE_DB_DB:
description: "matrixone cloud db"
required: true

jobs:
check_organization_user:
Expand Down Expand Up @@ -281,6 +296,21 @@ jobs:
cd $GITHUB_WORKSPACE
python $GITHUB_WORKSPACE/parse_coverage.py -coverage_files $GITHUB_WORKSPACE/matrixone/ut_coverage.out $GITHUB_WORKSPACE/matrixone/bvt_coverage.out -diff_path $GITHUB_WORKSPACE/matrixone/diff.patch

- name: Check Coverage(compare with branch main)
uses: matrixorigin/CI/actions/check-coverage@main
with:
type: open
ut_coverage_file: ${{ github.workspace }}/coverage_downloads/ut_coverage_sort.out
bvt_coverage_file: ${{ github.workspace }}/coverage_downloads/bvt_coverage.out
commit_id: ${{ github.event.pull_request.head.sha }}
branch: 'main'
pr_number: ${{ github.event.pull_request.number }}
mo_host: ${{ secrets.EE_DB_ADDR }}
mo_port: ${{ secrets.EE_DB_PORT }}
mo_user: ${{ secrets.EE_DB_USER }}
mo_password: ${{ secrets.EE_DB_PASSWORD }}
mo_database: ${{ secrets.EE_DB_DB }}

- name: Compress final result files
id: compress_result
if: ${{ always() && !cancelled() }}
Expand Down
39 changes: 39 additions & 0 deletions actions/check-coverage/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Coverage Comparison Action
description: 'Compares coverage and updates database.'
inputs:
type:
description: 'PR status is open or merged'
required: true
ut_coverage_file:
description: 'Ut coverage file path'
required: false
bvt_coverage_file:
description: 'Bvt coverage file path'
required: false
commit_id:
description: 'github commit id'
required: true
branch:
description: 'This branch'
required: true
pr_number:
description: 'This pr number'
required: true
mo_host:
description: 'This mo host'
required: true
mo_port:
description: 'This mo port'
required: true
mo_user:
description: 'This mo user'
required: true
mo_password:
description: 'This mo password'
required: true
mo_database:
description: 'This mo datavase Name'
required: true
runs:
using: 'node20'
main: 'dist/index.js'
Loading