Skip to content

Update test times

Update test times #889

name: Update test times
on:
schedule:
# Every day at 3:05am UTC approximately 8:05 PM PT (depending on DST)
- cron: "5 3 * * *"
# Have the ability to trigger this job manually
workflow_dispatch:
pull_request:
paths:
- "tools/torchci/update_test_times.py"
- ".github/workflows/update-test-times.yml"
permissions:
contents: write
defaults:
run:
working-directory: tools
jobs:
update-test-time-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Dependencies
run: python -m pip install boto3==1.19.12 clickhouse-connect==0.7.16 requests==2.26.0
- name: Update test times
run: |
python -m torchci.update_test_times
env:
ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }}
CLICKHOUSE_ENDPOINT: ${{ secrets.CLICKHOUSE_HUD_USER_URL }}
CLICKHOUSE_USERNAME: ${{ secrets.CLICKHOUSE_HUD_USER_USERNAME }}
CLICKHOUSE_PASSWORD: ${{ secrets.CLICKHOUSE_HUD_USER_PASSWORD }}
- name: Push test file times file to this repository
if: github.event_name != 'pull_request'
uses: dmnemec/copy_file_to_another_repo_action@5f40763ccee2954067adba7fb8326e4df33bcb92
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: 'tools/test-times.json'
destination_repo: 'pytorch/test-infra'
destination_folder: 'stats'
destination_branch: generated-stats
user_email: 'test-infra@pytorch.org'
user_name: 'PyTorch Test Infra'
commit_message: 'Updating test time stats'
- name: Push test class times file to this repository
if: github.event_name != 'pull_request'
uses: dmnemec/copy_file_to_another_repo_action@5f40763ccee2954067adba7fb8326e4df33bcb92
env:
API_TOKEN_GITHUB: ${{ secrets.GITHUB_TOKEN }}
with:
source_file: 'tools/test-class-times.json'
destination_repo: 'pytorch/test-infra'
destination_folder: 'stats'
destination_branch: generated-stats
user_email: 'test-infra@pytorch.org'
user_name: 'PyTorch Test Infra'
commit_message: 'Updating test time stats'