Skip to content

Commit

Permalink
Comment the performance result
Browse files Browse the repository at this point in the history
  • Loading branch information
whitphx committed May 20, 2024
1 parent 92ffd56 commit df4c29f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/test-functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
source_branch: ${{ steps.changes.outputs.source_branch }}
source_repo: ${{ steps.changes.outputs.source_repo }}
mergeable: ${{ steps.changes.outputs.mergeable }}
found_pr: ${{ steps.changes.outputs.found_pr }}
steps:
- uses: actions/checkout@v4
- uses: "gradio-app/gradio/.github/actions/changes@main"
Expand Down Expand Up @@ -81,9 +82,10 @@ jobs:
. venv/bin/activate
pnpm --filter @gradio/app test:browser:lite
- name: Get the performance result
id: get_perf
run: |
export LITE_APP_LOAD_TIME=$(jq -r '.app_load_time' .lite-perf.json)
echo "LITE_APP_LOAD_TIME=$LITE_APP_LOAD_TIME" >> $GITHUB_ENV
echo "LITE_APP_LOAD_TIME=$LITE_APP_LOAD_TIME" >> $GITHUB_OUTPUT
- name: do check
if: always()
uses: "gradio-app/github/actions/commit-status@main"
Expand All @@ -95,3 +97,18 @@ jobs:
name: "test / functional"
result: ${{ job.status }}
job_id: "test-functional"
outputs:
app_load_time: ${{ steps.get_perf.outputs.LITE_APP_LOAD_TIME }}

comment-functional-success:
uses: "./.github/workflows/comment-queue.yml"
needs: [test-functional, changes]
if: needs.changes.outputs.found_pr == 'true'
secrets:
gh_token: ${{ secrets.COMMENT_TOKEN }}
with:
pr_number: ${{ needs.changes.outputs.pr_number }}
message: functional~success~null
additional_text: |
**Lite Performance**
- App Load Time: ${{ needs.test-functional.outputs.app_load_time }}

0 comments on commit df4c29f

Please sign in to comment.