Test File Report Generator #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test File Report Generator | |
| on: | |
| schedule: | |
| # Run every day at 2am UTC | |
| - cron: '0 2 * * *' | |
| # Run every tuesday at 3am UTC | |
| - cron: '0 3 * * 2' | |
| workflow_dispatch: | |
| jobs: | |
| file-report: | |
| if: > | |
| (github.event_name == 'schedule' && github.event.schedule == '0 2 * * *') || | |
| (github.event_name == 'workflow_dispatch') | |
| permissions: | |
| issues: write | |
| runs-on: linux.2xlarge | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| path: test-infra | |
| - name: Checkout pytorch | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| repository: pytorch/pytorch | |
| path: pytorch | |
| - name: Install dependencies | |
| run: | | |
| cd test-infra | |
| python3 -mpip install -r tools/torchci/requirements.txt | |
| cd tools/torchci && python3 -mpip install -e . | |
| - name: Run file report generator | |
| env: | |
| CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} | |
| CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} | |
| CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} | |
| run: | | |
| cd test-infra | |
| now=$(date +%s) | |
| TWO_DAYS_AGO=$((now - 3*86400)) | |
| python3 tools/torchci/test_insights/file_report_generator.py \ | |
| --add-dates "$TWO_DAYS_AGO" "$now" | |
| - name: Generate regression notification | |
| env: | |
| CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }} | |
| CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }} | |
| CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| AWS_INFRA_ALERTS_LAMBDA_URL: ${{ secrets.AWS_INFRA_ALERTS_LAMBDA_URL }} | |
| TEST_REPORT_AWS_LAMBDA_TOKEN: ${{ secrets.TEST_REPORT_AWS_LAMBDA_TOKEN }} | |
| HUD_API_TOKEN: ${{ secrets.HUD_API_TOKEN }} | |
| run: | | |
| cd test-infra | |
| python3 tools/torchci/test_insights/daily_regression.py | |
| weekly-file-report-notification: | |
| if: > | |
| (github.event_name == 'schedule' && github.event.schedule == '0 3 * * 2') || | |
| (github.event_name == 'workflow_dispatch') | |
| permissions: | |
| issues: write | |
| runs-on: linux.2xlarge | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies | |
| run: | | |
| python3 -mpip install -r tools/torchci/requirements.txt | |
| cd tools/torchci && python3 -mpip install -e . | |
| - name: Run notifier | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| AWS_INFRA_ALERTS_LAMBDA_URL: ${{ secrets.AWS_INFRA_ALERTS_LAMBDA_URL }} | |
| TEST_REPORT_AWS_LAMBDA_TOKEN: ${{ secrets.TEST_REPORT_AWS_LAMBDA_TOKEN }} | |
| run: | | |
| python3 tools/torchci/test_insights/weekly_notification.py |