-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
infra[minor]: Add vertexai to latest/lowest ci
- Loading branch information
1 parent
a550a7f
commit 2d827e3
Showing
7 changed files
with
182 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "dependency-range-tests", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Tests dependency ranges for LangChain.", | ||
"dependencies": { | ||
"semver": "^7.5.4" | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
dependency_range_tests/scripts/vertexai/node/update_resolutions_lowest.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
const fs = require("fs"); | ||
const semver = require("semver"); | ||
|
||
const communityPackageJsonPath = "package.json"; | ||
|
||
const currentPackageJson = JSON.parse(fs.readFileSync(communityPackageJsonPath)); | ||
|
||
if (currentPackageJson.dependencies["@langchain/core"] && !currentPackageJson.dependencies["@langchain/core"].includes("rc")) { | ||
const minVersion = semver.minVersion( | ||
currentPackageJson.dependencies["@langchain/core"] | ||
).version; | ||
currentPackageJson.overrides = { | ||
...currentPackageJson.overrides, | ||
"@langchain/core": minVersion, | ||
}; | ||
currentPackageJson.dependencies = { | ||
...currentPackageJson.dependencies, | ||
"@langchain/core": minVersion, | ||
}; | ||
} | ||
|
||
if (currentPackageJson.dependencies["@langchain/google-gauth"] && !currentPackageJson.dependencies["@langchain/google-gauth"].includes("rc")) { | ||
const minVersion = semver.minVersion( | ||
currentPackageJson.dependencies["@langchain/google-gauth"] | ||
).version; | ||
currentPackageJson.overrides = { | ||
...currentPackageJson.overrides, | ||
"@langchain/google-gauth": minVersion, | ||
}; | ||
currentPackageJson.dependencies = { | ||
...currentPackageJson.dependencies, | ||
"@langchain/google-gauth": minVersion, | ||
}; | ||
} | ||
|
||
fs.writeFileSync(communityPackageJsonPath, JSON.stringify(currentPackageJson, null, 2)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
lru-cache@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" | ||
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== | ||
dependencies: | ||
yallist "^4.0.0" | ||
|
||
semver@^7.5.4: | ||
version "7.5.4" | ||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" | ||
integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== | ||
dependencies: | ||
lru-cache "^6.0.0" | ||
|
||
yallist@^4.0.0: | ||
version "4.0.0" | ||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" | ||
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== |
16 changes: 16 additions & 0 deletions
16
dependency_range_tests/scripts/vertexai/test-with-latest-deps.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
export CI=true | ||
|
||
# enable extended globbing for omitting build artifacts | ||
shopt -s extglob | ||
|
||
# avoid copying build artifacts from the host | ||
cp -r ../libs/langchain-google-vertexai/!(node_modules|dist|dist-cjs|dist-esm|build|.next|.turbo) ./ | ||
|
||
yarn | ||
|
||
# Check the test command completes successfully | ||
NODE_OPTIONS=--experimental-vm-modules yarn run jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50% |
27 changes: 27 additions & 0 deletions
27
dependency_range_tests/scripts/vertexai/test-with-lowest-deps.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
export CI=true | ||
|
||
# enable extended globbing for omitting build artifacts | ||
shopt -s extglob | ||
|
||
# avoid copying build artifacts from the host | ||
cp -r ../libs/langchain-google-vertexai/!(node_modules|dist|dist-cjs|dist-esm|build|.next|.turbo) ./ | ||
|
||
mkdir -p /updater_script | ||
cp -r /scripts/vertexai/node/!(node_modules|dist|dist-cjs|dist-esm|build|.next|.turbo) /updater_script/ | ||
|
||
cd /updater_script | ||
|
||
yarn | ||
|
||
cd /app | ||
|
||
node /updater_script/update_resolutions_lowest.js | ||
|
||
yarn | ||
|
||
# Check the test command completes successfully | ||
NODE_OPTIONS=--experimental-vm-modules yarn run jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50% |