[Bug] update-test-durations never runs: its only path filter points at the pre-monorepo tests/ directory

オープン
#9,212 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@badrbel がすでに取り組んでいます。

2026年11月7日 から。

  • #9219 @badrbel による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
github-actions, python, yaml
領域
ci-cd

調査の方向性

Read .github/workflows/update-test-durations.yml and inspect its on.push.paths filter against the package test paths listed in the issue. Confirm the workflow runs for changes under those paths; the issue proposes lib/**/tests/**/*.py. Done means pushes that change package tests can trigger the workflow. An open linked pull request already covers this issue.

索引モデルが issue の本文から書いたものです。

説明

update-test-durations never runs: its only path filter points at the pre-monorepo tests/ directory

What

.github/workflows/update-test-durations.yml is triggered by pushes to main, gated on a single path filter:

on:
  push:
    branches:
      - main
    paths:
      - 'tests/**/*.py'
  workflow_dispatch:

The repository has no root tests/ directory any more — git ls-files tests returns 0 files. The tests moved into the monorepo packages:

lib/cli/tests            62 files
lib/crewai/tests        953 files
lib/crewai-core/tests    11 files
lib/crewai-files/tests   21 files
lib/crewai-tools/tests   86 files
lib/devtools/tests        6 files

So the filter can never match, the workflow only ever fires by manual workflow_dispatch, and the .test_durations_py* artifacts it writes are only refreshed when someone remembers to run it by hand.

Why it matters

The workflow's whole job is to keep the duration data fresh so the sharded test runs stay balanced:

      - name: Run all tests and store durations
        run: uv run pytest --store-durations --durations-path=.test_durations_py${PYTHON_VERSION_SAFE} -n auto
      - name: Save durations to cache
        uses: actions/cache/save@...
        with:
          path: .test_durations_py*
          key: test-durations-py${{ matrix.python-version }}

With the filter dead, durations drift as tests are added or slowed down, and the split silently gets worse — nothing fails, it just costs CI minutes.

Fix

Replace the stale path with the location tests actually live in (two-line diff, on.push.paths only):

--- a/.github/workflows/update-test-durations.yml
+++ b/.github/workflows/update-test-durations.yml
@@ -5,7 +5,7 @@ on:
     branches:
       - main
     paths:
-      - 'tests/**/*.py'
+      - 'lib/**/tests/**/*.py'
   workflow_dispatch:

If you would rather it fire on any package change (tests and sources both affect durations), 'lib/**' is the alternative — say which and I will send exactly that.

How this was found

A small check that resolves every on.pull_request.paths / on.push.paths glob against the repository's file list and reports globs with zero matches; this was the only dead filter in the repo (1 of 19 workflows). Verified by hand with git ls-files above.


Per CONTRIBUTING.md, this issue is AI-authored and needs the llm-generated label; I cannot apply labels myself, so please add it. The fix is a one-line change and I will open the PR against this issue once it is accepted.

主要言語
Python
スター
60.6k
フォーク
9.1k
平均マージ
1日 2時間
マージ済み PR(30日)
214

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

crewAIInc/crewAI のほかの issue

crewAIInc/crewAI の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。