|
1 |
| -name: "ASV Bot" |
2 |
| - |
| 1 | +name: Comment Commands |
3 | 2 | on:
|
4 |
| - issue_comment: # Pull requests are issues |
5 |
| - types: |
6 |
| - - created |
7 |
| - |
8 |
| -env: |
9 |
| - ENV_FILE: environment.yml |
10 |
| - COMMENT: ${{github.event.comment.body}} |
| 3 | + issue_comment: |
| 4 | + types: created |
11 | 5 |
|
12 | 6 | permissions:
|
13 | 7 | contents: read
|
| 8 | + issues: write |
| 9 | + pull-requests: write |
14 | 10 |
|
15 | 11 | jobs:
|
16 |
| - autotune: |
17 |
| - permissions: |
18 |
| - contents: read |
19 |
| - issues: write |
20 |
| - pull-requests: write |
21 |
| - name: "Run benchmarks" |
22 |
| - # TODO: Support more benchmarking options later, against different branches, against self, etc |
23 |
| - if: startsWith(github.event.comment.body, '@github-actions benchmark') |
| 12 | + issue_assign: |
| 13 | + runs-on: ubuntu-22.04 |
| 14 | + if: (!github.event.issue.pull_request) && github.event.comment.body == 'take' |
| 15 | + concurrency: |
| 16 | + group: ${{ github.actor }}-issue-assign |
| 17 | + steps: |
| 18 | + run: | |
| 19 | + echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}" |
| 20 | + curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees |
| 21 | + preview_docs: |
24 | 22 | runs-on: ubuntu-22.04
|
| 23 | + if: github.event.issue.pull_request && github.event.comment.body == '/preview' |
| 24 | + concurrency: |
| 25 | + group: ${{ github.actor }}-preview-docs |
| 26 | + steps: |
| 27 | + run: | |
| 28 | + if curl --output /dev/null --silent --head --fail "https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"; then |
| 29 | + curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "Website preview of this PR available at: https://pandas.pydata.org/preview/${{ github.event.issue.number }}/"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments |
| 30 | + else |
| 31 | + curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"body": "No preview found for PR #${{ github.event.issue.number }}. Did the docs build complete?"}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments |
| 32 | + fi |
| 33 | + asv_run: |
| 34 | + runs-on: ubuntu-22.04 |
| 35 | + # TODO: Support more benchmarking options later, against different branches, against self, etc |
| 36 | + if: github.event.issue.pull_request && startsWith(github.event.comment.body, '@github-actions benchmark') |
25 | 37 | defaults:
|
26 | 38 | run:
|
27 | 39 | shell: bash -el {0}
|
| 40 | + env: |
| 41 | + ENV_FILE: environment.yml |
| 42 | + COMMENT: ${{github.event.comment.body}} |
28 | 43 |
|
29 | 44 | concurrency:
|
30 | 45 | # Set concurrency to prevent abuse(full runs are ~5.5 hours !!!)
|
|
47 | 62 |
|
48 | 63 | - name: Run benchmarks
|
49 | 64 | id: bench
|
50 |
| - continue-on-error: true # This is a fake failure, asv will exit code 1 for regressions |
| 65 | + continue-on-error: true # asv will exit code 1 for regressions |
51 | 66 | run: |
|
52 | 67 | # extracting the regex, see https://stackoverflow.com/a/36798723
|
53 | 68 | REGEX=$(echo "$COMMENT" | sed -n "s/^.*-b\s*\(\S*\).*$/\1/p")
|
|
0 commit comments