Skip to content

Commit

Permalink
Remove cra exports test, streamline test flow (langchain-ai#1956)
Browse files Browse the repository at this point in the history
* Remove cra exports test, streamline test flow

* Recreate test export Docker containers each time
  • Loading branch information
jacoblee93 authored Jul 13, 2023
1 parent 876abbb commit 94b9848
Show file tree
Hide file tree
Showing 22 changed files with 289 additions and 5,115 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ jobs:
- name: Build
run: yarn run build --filter="!docs"
- name: Test
run: yarn run test:unit --filter="!test-exports-cra"
# test-exports-cra is still run in test-exports task, currently not
# compatible with Node.js 20.x, so disabling here
# Note it is useful to run the others here in addition to test-exports
# because it would catch any issues that only manifest
# when optional peer deps are installed
run: yarn run test:unit

test-exports:
name: Environment Tests
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"./examples",
"./docs",
"./test-exports-vercel",
"./test-exports-cra",
],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": "./.github/workflows/deploy.yml"
Expand Down
13 changes: 0 additions & 13 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ services:
- ./langchain:/langchain
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-cra:
image: node:18
working_dir: /app
volumes:
- ./yarn.lock:/root/yarn.lock
- ./.yarnrc.yml:/root/.yarnrc.yml
- ./.yarn:/root/.yarn
- ./test-exports-cra:/package
- ./langchain:/langchain
- ./scripts:/scripts
command: bash /scripts/docker-ci-entrypoint.sh
test-exports-cf:
image: node:18
working_dir: /app
Expand Down Expand Up @@ -87,8 +76,6 @@ services:
condition: service_completed_successfully
test-exports-cjs:
condition: service_completed_successfully
test-exports-cra:
condition: service_completed_successfully
test-exports-cf:
condition: service_completed_successfully
test-exports-vercel:
Expand Down
1 change: 0 additions & 1 deletion langchain/scripts/create-entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ const testExports = [
(p) => `const ${p.replace(/\//g, "_")} = require("langchain/${p}");`,
],
["test-exports-cf", (p) => `export * from "langchain/${p}";`],
["test-exports-cra", (p) => `export * from "langchain/${p}";`],
["test-exports-vercel", (p) => `export * from "langchain/${p}";`],
["test-exports-vite", (p) => `export * from "langchain/${p}";`],
];
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"test-exports-esm",
"test-exports-cjs",
"test-exports-cf",
"test-exports-cra",
"test-exports-vercel",
"test-exports-vite"
],
Expand All @@ -29,13 +28,13 @@
"format:check": "turbo run format:check",
"lint": "turbo run lint",
"lint:fix": "yarn lint -- --fix",
"test": "turbo run test test:integration && yarn test:exports:docker",
"test": "turbo run test && yarn test:exports:docker",
"test:unit": "turbo run test",
"test:int": "yarn run test:int:deps && turbo run test:integration ; yarn run test:int:deps:down",
"test:int:deps": "docker compose -f test-int-deps-docker-compose.yml up -d",
"test:int:deps:down": "docker compose -f test-int-deps-docker-compose.yml down",
"test:exports:docker": "docker compose up",
"publish": "bash scripts/release-branch.sh && turbo run --filter langchain build lint test test:integration && yarn run test:exports:docker && yarn workspace langchain run release && echo '🔗 Open https://github.com/hwchase17/langchainjs/compare/release?expand=1 and merge the release PR'",
"test:exports:docker": "docker compose up --force-recreate",
"publish": "bash scripts/release-branch.sh && turbo run --filter langchain build lint test && yarn run test:exports:docker && yarn workspace langchain run release && echo '🔗 Open https://github.com/hwchase17/langchainjs/compare/release?expand=1 and merge the release PR'",
"example": "yarn workspace examples start",
"precommit": "turbo run precommit",
"docs": "yarn workspace docs start",
Expand All @@ -45,6 +44,7 @@
"license": "MIT",
"devDependencies": {
"@tsconfig/recommended": "^1.0.2",
"@types/jest": "^29.5.3",
"dotenv": "^16.0.3",
"husky": "^8.0.0",
"lint-staged": "^13.1.1",
Expand Down
23 changes: 0 additions & 23 deletions test-exports-cra/.gitignore

This file was deleted.

70 changes: 0 additions & 70 deletions test-exports-cra/README.md

This file was deleted.

46 changes: 0 additions & 46 deletions test-exports-cra/package.json

This file was deleted.

Binary file removed test-exports-cra/public/favicon.ico
Binary file not shown.
43 changes: 0 additions & 43 deletions test-exports-cra/public/index.html

This file was deleted.

Binary file removed test-exports-cra/public/logo192.png
Binary file not shown.
Binary file removed test-exports-cra/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions test-exports-cra/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions test-exports-cra/public/robots.txt

This file was deleted.

67 changes: 0 additions & 67 deletions test-exports-cra/src/App.js

This file was deleted.

8 changes: 0 additions & 8 deletions test-exports-cra/src/App.test.js

This file was deleted.

Loading

0 comments on commit 94b9848

Please sign in to comment.