From fba81582ab223f29183cb6cbd4bb03fe710791c5 Mon Sep 17 00:00:00 2001 From: Junyan Qin <1010553892@qq.com> Date: Wed, 27 Dec 2023 15:16:07 +0000 Subject: [PATCH] =?UTF-8?q?test:=20=E5=AE=8C=E5=96=84=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test-pr.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-pr.yml b/.github/workflows/test-pr.yml index 52141536..f2e37137 100644 --- a/.github/workflows/test-pr.yml +++ b/.github/workflows/test-pr.yml @@ -2,16 +2,26 @@ name: Test Pull Request on: pull_request: - types: [opened, ready_for_review] + types: [ready_for_review] paths: # 任何py文件改动都会触发 - '**.py' + pull_request_review: + types: [submitted] + pull_request_review_comment: + types: [created] # 允许手动触发 workflow_dispatch: jobs: perform-test: runs-on: ubuntu-latest + # 如果事件为pull_request_review且review状态为approved,则执行 + if: > + github.event_name == 'pull_request' || + (github.event_name == 'pull_request_review' && github.event.review.state == 'APPROVED') || + github.event_name == 'workflow_dispatch' || + (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/test') && github.event.comment.user.login == 'RockChinQ') steps: # 签出测试工程仓库代码 - name: Checkout