Skip to content

Commit

Permalink
chore: add performance
Browse files Browse the repository at this point in the history
  • Loading branch information
DaiQiangReal committed Nov 21, 2023
1 parent 6ec2655 commit 0cecf01
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
name: performance
name: Get Commit Hash on PR Merge

on:
workflow_dispatch:
inputs:
test_component_name:
description: 'Input Component Name to test performance, input all to test all'
required: false
pull_request:
types:
- closed

jobs:
performance:
get_commit_hash:
runs-on: ubuntu-latest
steps:
- run: |
wget https://lf3-static.bytednsdoc.com/obj/eden-cn/ptlz_zlp/ljhwZthlaukjlkulzlp/performance/main
chmod +x ./main
./main --mode=diffComponent --component=${{ github.event.inputs.test_component_name }}
tar -zcvf data.tar.gz data.db
env:
TOS_PASSWD: ${{ secrets.TOS_PASSWD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/upload-artifact@v3
with:
name: data.tar.gz
path: ./data.tar.gz
steps:
- name: Checkout code
uses: actions/checkout@v2

- uses: actions/upload-artifact@v3
with:
name: diffResult.txt
path: ./diffResult.txt
- name: Get commit hashes
if: ${{ github.event.pull_request.merged == true }}
env:
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
run: |
git checkout $BASE_BRANCH
echo "Current Commit: $(git rev-parse HEAD)"
echo "Before Commit: $( git rev-parse HEAD^)"

0 comments on commit 0cecf01

Please sign in to comment.