mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-12 12:47:53 +02:00
add CLI examples & integration tests (#711)
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
name: CLI integration test
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
env:
|
||||
POETRY_VERSION: "1.7.1"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.11"
|
||||
name: "CLI integration test"
|
||||
defaults:
|
||||
run:
|
||||
working-directory: libs/cli
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
|
||||
uses: "./.github/actions/poetry_setup"
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
poetry-version: ${{ env.POETRY_VERSION }}
|
||||
working-directory: libs/cli
|
||||
cache-key: integration-test-cli
|
||||
|
||||
- name: Setup env
|
||||
working-directory: libs/cli/examples
|
||||
run: cat .env.example > .env
|
||||
- name: Install cli globally
|
||||
run: pip install -e .
|
||||
- name: Start service A
|
||||
run: |
|
||||
langgraph up -c examples/langgraph.json --wait --verbose
|
||||
- name: Stop service A
|
||||
run: |
|
||||
langgraph down -c examples/langgraph.json
|
||||
sudo rm -rf .langgraph-data
|
||||
- name: Start service B
|
||||
working-directory: libs/cli/examples/graphs
|
||||
run: |
|
||||
langgraph up --wait --verbose
|
||||
- name: Stop service B
|
||||
working-directory: libs/cli/examples/graphs
|
||||
run: |
|
||||
langgraph down
|
||||
sudo rm -rf .langgraph-data
|
||||
- name: Start service C
|
||||
working-directory: libs/cli/examples/graphs_reqs_a
|
||||
run: |
|
||||
langgraph up --wait -d compose.yml --verbose
|
||||
- name: Stop service C
|
||||
working-directory: libs/cli/examples/graphs_reqs_a
|
||||
run: |
|
||||
langgraph down
|
||||
sudo rm -rf .langgraph-data
|
||||
- name: Start service D
|
||||
working-directory: libs/cli/examples/graphs_reqs_b
|
||||
run: |
|
||||
langgraph up --wait -d compose.yml --verbose
|
||||
- name: Stop service D
|
||||
working-directory: libs/cli/examples/graphs_reqs_b
|
||||
run: |
|
||||
langgraph down
|
||||
sudo rm -rf .langgraph-data
|
||||
@@ -57,8 +57,15 @@
|
||||
working-directory: ${{ matrix.working-directory }}
|
||||
secrets: inherit
|
||||
|
||||
integration-test:
|
||||
name: CLI integration test
|
||||
needs: [ build ]
|
||||
uses: ./.github/workflows/_integration_test.yml
|
||||
secrets: inherit
|
||||
|
||||
lint-js:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ]
|
||||
strategy:
|
||||
matrix:
|
||||
working-directory:
|
||||
@@ -83,7 +90,7 @@
|
||||
|
||||
ci_success:
|
||||
name: "CI Success"
|
||||
needs: [build, lint, lint-js, test]
|
||||
needs: [build, lint, lint-js, test, integration-test]
|
||||
if: |
|
||||
always()
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user