Skip to content
This repository was archived by the owner on Jul 3, 2025. It is now read-only.

fix(api): reuse ts.Program as much as possible #295

fix(api): reuse ts.Program as much as possible

fix(api): reuse ts.Program as much as possible #295

Workflow file for this run

---
name: CI
on:
push:
branches: [main]
pull_request: # Trigger on all PRs, ensuring required actions to be run.
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
#
# There's no point in testing an outdated version of the code. GitHub only allows
# a limited number of job runners to be active at the same time, so it's better to cancel
# pointless jobs early so that more useful jobs can run sooner.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.2.0
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
- name: Check formatting
run: |
pnpm turbo run format:check
test-cli:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.2.0
- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
- name: Run integration tests
working-directory: libs/langgraph-cli
run: |
pnpm turbo run test
test-parser:
timeout-minutes: 5
strategy:
fail-fast: false # Allow all tests to run even if one fails
matrix:
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.2.0
- uses: actions/setup-node@v4
name: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
- name: Build
working-directory: libs/langgraph-api
run: |
pnpm turbo run build
- name: Run integration tests
working-directory: libs/langgraph-api
run: |
pnpm run test:parser
test-api:
timeout-minutes: 10
strategy:
fail-fast: false # Allow all tests to run even if one fails
matrix:
node-version:
- "18.x"
- "20.x"
- "22.x"
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.2.0
- uses: actions/setup-node@v4
name: actions/setup-node@v4 for ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
- name: Build
working-directory: libs/langgraph-api
run: |
pnpm turbo run build
- name: Run integration tests
working-directory: libs/langgraph-api
run: |
pnpm run test:api ./tests/api.test.mts
test-auth:
timeout-minutes: 10
strategy:
fail-fast: false # Allow all tests to run even if one fails
matrix:
node-version:
- "20.x"
- "22.x"
os:
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10.2.0
- uses: actions/setup-node@v4
name: actions/setup-node@v4 for ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
- name: Install dependencies
run: |
pnpm install
- name: Build
working-directory: libs/langgraph-api
run: |
pnpm turbo run build
- name: Run integration tests
working-directory: libs/langgraph-api
run: |
pnpm run test:api -c ./graphs/langgraph.auth.json ./tests/auth.test.mts