Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirror CI improvements from conda's GH workflow #5019

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions ci/github/.condarc → .github/condarc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
auto_update_conda: False
always_yes: True
auto_activate_base: True
notify_outdated_conda: False
auto_update_conda: False
changeps1: False
pkgs_dirs:
- /usr/share/miniconda/envs/test/pkgs
always_yes: True
channels:
- defaults
local_repodata_ttl: 7200
notify_outdated_conda: False
pkgs_dirs:
- /usr/share/miniconda/envs/test/pkgs
63 changes: 63 additions & 0 deletions .github/workflows/durations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 <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.
Loading