Skip to content

Commit

Permalink
Add Slow CI reminder bot (huggingface#33506)
Browse files Browse the repository at this point in the history
* add workflow

* update

* fix

* Update .github/workflows/slow_ci_remainder.yml

Co-authored-by: Arthur <[email protected]>

* fix

* fix

---------

Co-authored-by: ydshieh <[email protected]>
Co-authored-by: Arthur <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2024
1 parent f5247ac commit 1d29a75
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/slow_ci_remainder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Slow CI Reminder

# For security reason, don't use `pull_request` but `pull_request_target`!
on:
pull_request_target:
paths:
- "src/transformers/models/*/*.py"
- "src/transformers/generation/*.py"
- "src/transformers/pipelines/*.py"
- "tests/models/*/*.py"
- "tests/generation/*/*.py"
- "tests/pipelines/*/*.py"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
remind:
name: remind
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Find comment
uses: peter-evans/find-comment@v2
id: find_comment
with:
issue-number: ${{ github.event.number }}
body-includes: Before merging this pull request, slow tests CI should be triggered. To enable this

- run: |
echo ${{ steps.find_comment.outputs.comment-id }}
- name: Delete previous comment (if found)
if: steps.find_comment.outputs.comment-id != ''
uses: actions/github-script@v6
with:
result-encoding: string
github-token: ${{ secrets.comment_bot_token }}
script: |
github.rest.issues.deleteComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: ${{ steps.find_comment.outputs.comment-id }},
})
- name: Add comment
uses: thollander/actions-comment-pull-request@v2
with:
message: |
Hey! 🤗 Thanks for your contribution to the `transformers` library!
Before merging this pull request, slow tests CI should be triggered. To enable this:
- Add the `run-slow` label to the PR
- When your PR is ready for merge and all reviewers' comments have been addressed, push an empty commit with the command `[run-slow]` followed by a comma separated list of all the models to be tested, i.e. `[run_slow] model_to_test_1, model_to_test_2`
- If the pull request affects a lot of models, put at most 10 models in the commit message
- A `transformers` maintainer will then approve the workflow to start the tests
(For maintainers) The documentation for slow tests CI on PRs is [here](https://www.notion.so/huggingface2/CI-for-pull-requests-8335bd9217d24d1e8ed1d3a016f39804).
pr_number: ${{ github.event.number }}
GITHUB_TOKEN: ${{ secrets.comment_bot_token }}

0 comments on commit 1d29a75

Please sign in to comment.