From c6a8663afb7c469be7c61afc6e02a515f9cca46d Mon Sep 17 00:00:00 2001
From: ccurme <chester.curme@gmail.com>
Date: Tue, 15 Apr 2025 12:04:08 -0400
Subject: [PATCH] infra: run old standard-tests on core releases (#30852)

On core releases, we check out the latest published package for
langchain-openai and langchain-anthropic and run their tests against the
candidate version of langchain-core.

Because these packages have a local install of langchain-tests, we also
need to check out the previous version of langchain-tests.
---
 .github/workflows/_release.yml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml
index 5e60c3bad52..4e8457c7214 100644
--- a/.github/workflows/_release.yml
+++ b/.github/workflows/_release.yml
@@ -395,8 +395,11 @@ jobs:
 
           # Checkout the latest package files
           rm -rf $GITHUB_WORKSPACE/libs/partners/${{ matrix.partner }}/*
-          cd $GITHUB_WORKSPACE/libs/partners/${{ matrix.partner }}
-          git checkout "$LATEST_PACKAGE_TAG" -- .
+          rm -rf $GITHUB_WORKSPACE/libs/standard-tests/*
+          cd $GITHUB_WORKSPACE/libs/
+          git checkout "$LATEST_PACKAGE_TAG" -- standard-tests/
+          git checkout "$LATEST_PACKAGE_TAG" -- partners/${{ matrix.partner }}/
+          cd partners/${{ matrix.partner }}
 
           # Print as a sanity check
           echo "Version number from pyproject.toml: "