forked from conda/conda
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.98 KB
/
durations.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
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 <[email protected]>
committer: Conda Bot <[email protected]>
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.