Skip to content

Commit

Permalink
ci[patch]: Adds npm install test for conflicting deps (langchain-ai#5895
Browse files Browse the repository at this point in the history
)

* Adds npm install test for conflicting deps

* Adds to CI

* Fix
  • Loading branch information
jacoblee93 authored Jun 25, 2024
1 parent 3f07d61 commit 9bd8199
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,22 @@ jobs:
- name: Test `@langchain/community` with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run community-lowest-deps

community-npm-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test npm install on `@langchain/community`
run: docker compose -f dependency_range_tests/docker-compose.yml run community-npm-install

# OpenAI
openai-latest-deps:
runs-on: ubuntu-latest
Expand Down
13 changes: 13 additions & 0 deletions dependency_range_tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@ services:
- ../libs/langchain-community:/libs/langchain-community
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/community/test-with-lowest-deps.sh
community-npm-install:
image: node:18
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-community:/libs/langchain-community
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/community/npm-install.sh

# OpenAI
openai-latest-deps:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -euxo pipefail

export CI=true

# New monorepo directory paths
monorepo_dir="/app/monorepo"
monorepo_community_dir="/app/monorepo/libs/langchain-community"

# Run the shared script to copy all necessary folders/files
bash /scripts/with_standard_tests/shared.sh community

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
npm install

0 comments on commit 9bd8199

Please sign in to comment.