Update Durations #16
This file contains 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: Update Durations | |
on: | |
# every Sunday at 00:00 UTC | |
# https://crontab.guru/#0_0_*_*_0 | |
schedule: | |
- cron: '0 0 * * 0' | |
# https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch | |
workflow_dispatch: | |
jobs: | |
update-durations: | |
runs-on: ubuntu-latest | |
permissions: | |
# necessary to open PR | |
# https://github.com/peter-evans/create-pull-request#action-inputs | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: download recent artifacts | |
run: | | |
gh run list \ | |
--branch main \ | |
--workflow tests \ | |
--limit 10 \ | |
--json databaseId \ | |
--jq '.[].databaseId' \ | |
| xargs \ | |
-n 1 \ | |
gh run download \ | |
--dir ${{ runner.temp }}/artifacts/ \ | |
--pattern '*-all' \ | |
|| true | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: combine recent durations from artifacts | |
run: python ./tools/durations/combine.py ${{ runner.temp }}/artifacts/ | |
- name: create updated durations PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
push-to-fork: conda-bot/conda | |
token: ${{ secrets.DURATIONS_TOKEN }} | |
branch: update-durations | |
delete-branch: true | |
commit-message: Update test durations | |
author: Conda Bot <18747875+conda-bot@users.noreply.github.com> | |
committer: Conda Bot <18747875+conda-bot@users.noreply.github.com> | |
title: 🤖 Update test durations | |
body: | | |
Aggregate recent test durations for each test and update the durations file. | |
[durations.yml]: ${{ github.server_url }}/${{ github.repository }}/blob/main/.github/workflows/durations.yml | |
This PR was created automatically by the [`durations.yml`][durations.yml] workflow. |