Skip to content

The agent engineering platform.

fix(infra): skip codspeed for partners without benchmarks (#36775)

Mason Daughertyf2d3a2f6e2e6
diff --git a/.github/scripts/check_diff.py b/.github/scripts/check_diff.py
index 04ec627eb2..bf7dc8b875 100644
--- a/.github/scripts/check_diff.py
+++ b/.github/scripts/check_diff.py
@@ -316,8 +316,13 @@ if __name__ == "__main__":
if not filename.startswith(".")
] != ["README.md"]:
dirs_to_run["test"].add(f"libs/partners/{partner_dir}")
- # Skip codspeed for partners without benchmarks or in IGNORED_PARTNERS
- if partner_dir not in IGNORED_PARTNERS:
+ # Only add to codspeed if the partner has benchmarks and is not ignored
+ if (
+ partner_dir not in IGNORED_PARTNERS
+ and os.path.isdir(
+ f"libs/partners/{partner_dir}/tests/benchmarks"
+ )
+ ):
dirs_to_run["codspeed"].add(f"libs/partners/{partner_dir}")
# Skip if the directory was deleted or is just a tombstone readme
elif file.startswith("libs/"):
diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml
index 291e574722..50c2e3ff93 100644
--- a/.github/workflows/codspeed.yml
+++ b/.github/workflows/codspeed.yml
@@ -77,7 +77,5 @@ jobs:
token: ${{ secrets.CODSPEED_TOKEN }}
run: |
cd ${{ matrix.job-configs.working-directory }}
- if [ "${{ matrix.job-configs.working-directory }}" = "libs/core" ] || [ "${{ matrix.job-configs.working-directory }}" = "libs/langchain_v1" ]; then
- uv run --no-sync pytest ./tests/benchmarks --codspeed
- fi
+ uv run --no-sync pytest ./tests/benchmarks --codspeed
mode: ${{ matrix.job-configs.codspeed-mode }}