-
Notifications
You must be signed in to change notification settings - Fork 73
73 lines (70 loc) · 2.21 KB
/
check-alerts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Check Alerts
on:
pull_request:
paths:
- .github/workflows/check-alerts.yml
- tools/torchci/check_alerts.py
- tools/torchci/queue_alert.py
schedule:
# Every 5 minutes
- cron: "*/5 * * * *"
# Have the ability to trigger this job manually through the API
workflow_dispatch:
jobs:
update-alerts:
strategy:
matrix:
include:
- repo: pytorch/pytorch
branch: main
with_flaky_test_alerting: YES
job_filter_regex: ""
- repo: pytorch/pytorch
branch: nightly
with_flaky_test_alerting: NO
job_filter_regex: ""
- repo: pytorch/builder
branch: main
with_flaky_test_alerting: NO
job_filter_regex: ".*nightly.pypi.binary.size.validation|cron / release /"
env:
REPO_TO_CHECK: ${{ matrix.repo }}
BRANCH_TO_CHECK: ${{ matrix.branch }}
WITH_FLAKY_TEST_ALERT: ${{ matrix.with_flaky_test_alerting }}
JOB_NAME_REGEX: ${{ matrix.job_filter_regex }}
# Don't do actual work on pull request
DRY_RUN: ${{ github.event_name == 'pull_request'}}
runs-on: ubuntu-22.04
permissions:
issues: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: pip3 install requests setuptools==61.2.0
- name: Check for alerts and creates issue
run: |
cd tools
python3 -m torchci.check_alerts
env:
# NOTE: Should be a blank string for pull requests
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-queue-alert:
env:
DRY_RUN: ${{ github.event_name == 'pull_request' }}
ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }}
runs-on: ubuntu-22.04
permissions:
issues: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: pip3 install requests setuptools==61.2.0 rockset==1.0.3
- name: Check for alerts and creates issue
run: |
cd tools
python3 -m torchci.queue_alert
env:
# NOTE: Should be a blank string for pull requests
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}