Skip to content

Update test times

Update test times #496

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:
- "torchci/scripts/test_update_test_times.yml"
- "torchci/scripts/update_test_times.py"
- ".github/workflows/update-test-times.yml"
defaults:
run:
working-directory: torchci
jobs:
update-test-time-stats:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
pip3 install boto3==1.19.12
pip3 install rockset==1.0.3
- name: Run tests
run: python3 scripts/test_update_test_times.py
- name: Update test times
run: |
python3 scripts/update_test_times.py
env:
ROCKSET_API_KEY: ${{ secrets.ROCKSET_API_KEY }}
- 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: 'torchci/test-times.json'
destination_repo: 'pytorch/test-infra'
destination_folder: 'stats'
destination_branch: generated-stats
user_email: '[email protected]'
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: 'torchci/test-class-times.json'
destination_repo: 'pytorch/test-infra'
destination_folder: 'stats'
destination_branch: generated-stats
user_email: '[email protected]'
user_name: 'PyTorch Test Infra'
commit_message: 'Updating test time stats'