danila-b commented on code in PR #14331:
URL: https://github.com/apache/datafusion/pull/14331#discussion_r1986110748


##########
.github/workflows/extended.yml:
##########
@@ -33,16 +33,46 @@ on:
   push:
     branches:
       - main
+  issue_comment:
+    types: [created]
+
+permissions:
+  pull-requests: write
 
 jobs:
+  # Check issue comment and notify that extended tests are running
+  check_issue_comment:
+    name: Check issue comment
+    runs-on: ubuntu-latest
+    if: github.event.issue.pull_request && github.event.comment.body == 'run 
extended tests'
+    steps:
+      - uses: actions/github-script@v7
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          script: |
+            github.rest.issues.createComment({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              body: "Running extended tests..."
+            })
+
   # Check crate compiles and base cargo check passes
   linux-build-lib:
     name: linux build test
     runs-on: ubuntu-latest
     container:
       image: amd64/rust
+    if: |
+      github.event_name == 'push' ||
+      (github.event_name == 'issue_comment' && github.event.issue.pull_request 
&& github.event.comment.body == 'run extended tests')
     steps:
       - uses: actions/checkout@v4
+        with:
+          # Check out the pull request branch if triggered by a comment
+          ref: ${{ github.event_name == 'issue_comment' && 
github.event.issue.pull_request.head.ref || github.ref }}

Review Comment:
   @alamb I gave it a stab implementing this here: 
https://github.com/apache/datafusion/pull/15101
   It should dispatch extended tests on a PR comment, and also create and 
update the check marker on the PR. 
   
   Testing this is a bit of a pain since I don't know any better way than to 
just merge the workflow to the main branch of the fork and run several test 
PRs. At least seems to work properly from a quick glance, will test a bit more 
during the weekend. 



##########
.github/workflows/extended.yml:
##########
@@ -33,16 +33,46 @@ on:
   push:
     branches:
       - main
+  issue_comment:
+    types: [created]
+
+permissions:
+  pull-requests: write
 
 jobs:
+  # Check issue comment and notify that extended tests are running
+  check_issue_comment:
+    name: Check issue comment
+    runs-on: ubuntu-latest
+    if: github.event.issue.pull_request && github.event.comment.body == 'run 
extended tests'
+    steps:
+      - uses: actions/github-script@v7
+        with:
+          github-token: ${{secrets.GITHUB_TOKEN}}
+          script: |
+            github.rest.issues.createComment({
+              issue_number: context.issue.number,
+              owner: context.repo.owner,
+              repo: context.repo.repo,
+              body: "Running extended tests..."
+            })
+
   # Check crate compiles and base cargo check passes
   linux-build-lib:
     name: linux build test
     runs-on: ubuntu-latest
     container:
       image: amd64/rust
+    if: |
+      github.event_name == 'push' ||
+      (github.event_name == 'issue_comment' && github.event.issue.pull_request 
&& github.event.comment.body == 'run extended tests')
     steps:
       - uses: actions/checkout@v4
+        with:
+          # Check out the pull request branch if triggered by a comment
+          ref: ${{ github.event_name == 'issue_comment' && 
github.event.issue.pull_request.head.ref || github.ref }}

Review Comment:
   @alamb I gave it a stab implementing this here without any 3rd party 
actions: https://github.com/apache/datafusion/pull/15101
   It should dispatch extended tests on a PR comment, and also create and 
update the check marker on the PR. 
   
   Testing this is a bit of a pain since I don't know any better way than to 
just merge the workflow to the main branch of the fork and run several test 
PRs. At least seems to work properly from a quick glance, will test a bit more 
during the weekend. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to