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


##########
.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:
   Apparently it did run them, it's just not visible in GitHub UI. I have just 
double checked it with a bit different implementation on the same branch. 
   
   Unfortunately, it seems that `issue_comment` event trigger is associated 
with default branch, and hence it does not add anything to the checks or UI of 
the PR itself. I can take a look if there is a better way to launch check 
associated with PR during the weekend, but from the top of my head, there are a 
couple of options:
   
   1. Use `workflow_dispatch` event and trigger extended tests for the branch 
from the GitHub actions UI tab instead of doing so by comment on the PR
   2. Use [3rd party 
action](https://github.com/myrotvorets/set-commit-status-action) to set check 
statuses when the run is triggered by a comment
   3. Maybe [slash command 3rd party 
action](https://github.com/marketplace/actions/slash-command-dispatch) can also 
work for triggering commands a bit better since it uses dispatch event under 
the hood as well



-- 
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