Skip to content

The agent engineering platform.

refactor: enhance workflow names and descriptions for clarity (#32262)

Mason Daugherty9d38f170ce49
diff --git a/.github/workflows/_compile_integration_test.yml b/.github/workflows/_compile_integration_test.yml
index d3267d2b13..566a7ea000 100644
--- a/.github/workflows/_compile_integration_test.yml
+++ b/.github/workflows/_compile_integration_test.yml
@@ -1,4 +1,4 @@
-name: compile-integration-test
+name: 'πŸ”— Compile Integration Tests'
on:
workflow_call:
@@ -25,24 +25,24 @@ jobs:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 20
- name: "uv run pytest -m compile tests/integration_tests #${{ inputs.python-version }}"
+ name: 'Python ${{ inputs.python-version }}'
steps:
- uses: actions/checkout@v4
- - name: Set up Python ${{ inputs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ inputs.python-version }}
- - name: Install integration dependencies
+ - name: 'πŸ“¦ Install Integration Dependencies'
shell: bash
run: uv sync --group test --group test_integration
- - name: Check integration tests compile
+ - name: 'πŸ”— Check Integration Tests Compile'
shell: bash
run: uv run pytest -m compile tests/integration_tests
- - name: Ensure the tests did not create any additional files
+ - name: '🧹 Verify Clean Working Directory'
shell: bash
run: |
set -eu
diff --git a/.github/workflows/_integration_test.yml b/.github/workflows/_integration_test.yml
index 2675cc6e22..48e277e936 100644
--- a/.github/workflows/_integration_test.yml
+++ b/.github/workflows/_integration_test.yml
@@ -1,4 +1,4 @@
-name: Integration Tests
+name: 'πŸš€ Integration Tests'
on:
workflow_dispatch:
@@ -24,20 +24,20 @@ jobs:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
- name: Python ${{ inputs.python-version }}
+ name: 'πŸš€ Integration Tests (Python ${{ inputs.python-version }})'
steps:
- uses: actions/checkout@v4
- - name: Set up Python ${{ inputs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ inputs.python-version }}
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Integration Dependencies'
shell: bash
run: uv sync --group test --group test_integration
- - name: Run integration tests
+ - name: 'πŸš€ Run Integration Tests'
shell: bash
env:
AI21_API_KEY: ${{ secrets.AI21_API_KEY }}
diff --git a/.github/workflows/_lint.yml b/.github/workflows/_lint.yml
index 22145ad04c..de83f80188 100644
--- a/.github/workflows/_lint.yml
+++ b/.github/workflows/_lint.yml
@@ -1,4 +1,6 @@
-name: lint
+name: '🧹 Code Linting'
+# Runs code quality checks using ruff, mypy, and other linting tools
+# Checks both package code and test code for consistency
on:
workflow_call:
@@ -24,19 +26,21 @@ env:
UV_FROZEN: "true"
jobs:
+ # Linting job - runs quality checks on package and test code
build:
- name: "make lint #${{ inputs.python-version }}"
+ name: 'Python ${{ inputs.python-version }}'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- - uses: actions/checkout@v4
+ - name: 'πŸ“‹ Checkout Code'
+ uses: actions/checkout@v4
- - name: Set up Python ${{ inputs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ inputs.python-version }}
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Lint & Typing Dependencies'
# Also installs dev/lint/test/typing dependencies, to ensure we have
# type hints for as many of our libraries as possible.
# This helps catch errors that require dependencies to be spotted, for example:
@@ -49,12 +53,12 @@ jobs:
run: |
uv sync --group lint --group typing
- - name: Analysing the code with our lint
+ - name: 'πŸ” Analyze Package Code with Linters'
working-directory: ${{ inputs.working-directory }}
run: |
make lint_package
- - name: Install unit test dependencies
+ - name: 'πŸ“¦ Install Unit Test Dependencies'
# Also installs dev/lint/test/typing dependencies, to ensure we have
# type hints for as many of our libraries as possible.
# This helps catch errors that require dependencies to be spotted, for example:
@@ -67,13 +71,13 @@ jobs:
working-directory: ${{ inputs.working-directory }}
run: |
uv sync --inexact --group test
- - name: Install unit+integration test dependencies
+ - name: 'πŸ“¦ Install Unit + Integration Test Dependencies'
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
working-directory: ${{ inputs.working-directory }}
run: |
uv sync --inexact --group test --group test_integration
- - name: Analysing the code with our lint
+ - name: 'πŸ” Analyze Test Code with Linters'
working-directory: ${{ inputs.working-directory }}
run: |
make lint_tests
diff --git a/.github/workflows/_release.yml b/.github/workflows/_release.yml
index 56cf99cf82..283ba41bba 100644
--- a/.github/workflows/_release.yml
+++ b/.github/workflows/_release.yml
@@ -1,5 +1,5 @@
-name: Release
-run-name: Release ${{ inputs.working-directory }} by @${{ github.actor }}
+name: 'πŸš€ Package Release'
+run-name: 'πŸš€ Release ${{ inputs.working-directory }} by @${{ github.actor }}'
on:
workflow_call:
inputs:
@@ -18,7 +18,7 @@ on:
required: false
type: boolean
default: false
- description: "Release from a non-master branch (danger!)"
+ description: "Release from a non-master branch (danger!) - Only use for hotfixes"
env:
PYTHON_VERSION: "3.11"
@@ -26,6 +26,8 @@ env:
UV_NO_SYNC: "true"
jobs:
+ # Build the distribution package and extract version info
+ # Runs in isolated environment with minimal permissions for security
build:
if: github.ref == 'refs/heads/master' || inputs.dangerous-nonmaster-release
environment: Scheduled testing
diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml
index 4bc564e488..0deb2b5359 100644
--- a/.github/workflows/_test.yml
+++ b/.github/workflows/_test.yml
@@ -1,4 +1,6 @@
-name: test
+name: 'πŸ§ͺ Unit Testing'
+# Runs unit tests with both current and minimum supported dependency versions
+# to ensure compatibility across the supported range
on:
workflow_call:
@@ -20,31 +22,33 @@ env:
UV_NO_SYNC: "true"
jobs:
+ # Main test job - runs unit tests with current deps, then retests with minimum versions
build:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 20
- name: "make test #${{ inputs.python-version }}"
+ name: 'Python ${{ inputs.python-version }}'
steps:
- - uses: actions/checkout@v4
+ - name: 'πŸ“‹ Checkout Code'
+ uses: actions/checkout@v4
- - name: Set up Python ${{ inputs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
id: setup-python
with:
python-version: ${{ inputs.python-version }}
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Test Dependencies'
shell: bash
run: uv sync --group test --dev
- - name: Run core tests
+ - name: 'πŸ§ͺ Run Core Unit Tests'
shell: bash
run: |
make test
- - name: Get minimum versions
+ - name: 'πŸ” Calculate Minimum Dependency Versions'
working-directory: ${{ inputs.working-directory }}
id: min-version
shell: bash
@@ -55,7 +59,7 @@ jobs:
echo "min-versions=$min_versions" >> "$GITHUB_OUTPUT"
echo "min-versions=$min_versions"
- - name: Run unit tests with minimum dependency versions
+ - name: 'πŸ§ͺ Run Tests with Minimum Dependencies'
if: ${{ steps.min-version.outputs.min-versions != '' }}
env:
MIN_VERSIONS: ${{ steps.min-version.outputs.min-versions }}
@@ -64,7 +68,7 @@ jobs:
make tests
working-directory: ${{ inputs.working-directory }}
- - name: Ensure the tests did not create any additional files
+ - name: '🧹 Verify Clean Working Directory'
shell: bash
run: |
set -eu
diff --git a/.github/workflows/_test_doc_imports.yml b/.github/workflows/_test_doc_imports.yml
index b2ce8f445b..ebc95c77a7 100644
--- a/.github/workflows/_test_doc_imports.yml
+++ b/.github/workflows/_test_doc_imports.yml
@@ -1,4 +1,4 @@
-name: test_doc_imports
+name: 'πŸ“‘ Documentation Import Testing'
on:
workflow_call:
@@ -18,29 +18,30 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
- name: "check doc imports #${{ inputs.python-version }}"
+ name: 'πŸ” Check Doc Imports (Python ${{ inputs.python-version }})'
steps:
- - uses: actions/checkout@v4
+ - name: 'πŸ“‹ Checkout Code'
+ uses: actions/checkout@v4
- - name: Set up Python ${{ inputs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ inputs.python-version }}
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Test Dependencies'
shell: bash
run: uv sync --group test
- - name: Install langchain editable
+ - name: 'πŸ“¦ Install LangChain in Editable Mode'
run: |
VIRTUAL_ENV=.venv uv pip install langchain-experimental langchain-community -e libs/core libs/langchain
- - name: Check doc imports
+ - name: 'πŸ” Validate Documentation Import Statements'
shell: bash
run: |
uv run python docs/scripts/check_imports.py
- - name: Ensure the test did not create any additional files
+ - name: '🧹 Verify Clean Working Directory'
shell: bash
run: |
set -eu
diff --git a/.github/workflows/_test_pydantic.yml b/.github/workflows/_test_pydantic.yml
index b290690dad..a6b6b18375 100644
--- a/.github/workflows/_test_pydantic.yml
+++ b/.github/workflows/_test_pydantic.yml
@@ -1,4 +1,4 @@
-name: test pydantic intermediate versions
+name: '🐍 Pydantic Version Testing'
on:
workflow_call:
@@ -31,29 +31,30 @@ jobs:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
timeout-minutes: 20
- name: "make test # pydantic: ~=${{ inputs.pydantic-version }}, python: ${{ inputs.python-version }}, "
+ name: 'Pydantic ~=${{ inputs.pydantic-version }}'
steps:
- - uses: actions/checkout@v4
+ - name: 'πŸ“‹ Checkout Code'
+ uses: actions/checkout@v4
- - name: Set up Python ${{ inputs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ inputs.python-version }}
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Test Dependencies'
shell: bash
run: uv sync --group test
- - name: Overwrite pydantic version
+ - name: 'πŸ”„ Install Specific Pydantic Version'
shell: bash
run: VIRTUAL_ENV=.venv uv pip install pydantic~=${{ inputs.pydantic-version }}
- - name: Run core tests
+ - name: 'πŸ§ͺ Run Core Tests'
shell: bash
run: |
make test
- - name: Ensure the tests did not create any additional files
+ - name: '🧹 Verify Clean Working Directory'
shell: bash
run: |
set -eu
diff --git a/.github/workflows/_test_release.yml b/.github/workflows/_test_release.yml
index b09b394a81..4f3519fb64 100644
--- a/.github/workflows/_test_release.yml
+++ b/.github/workflows/_test_release.yml
@@ -1,4 +1,4 @@
-name: test-release
+name: 'πŸ§ͺ Test Release Package'
on:
workflow_call:
@@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up Python + uv
+ - name: '🐍 Set up Python + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ env.PYTHON_VERSION }}
@@ -45,17 +45,17 @@ jobs:
# > It is strongly advised to separate jobs for building [...]
# > from the publish job.
# https://github.com/pypa/gh-action-pypi-publish#non-goals
- - name: Build project for distribution
+ - name: 'πŸ“¦ Build Project for Distribution'
run: uv build
working-directory: ${{ inputs.working-directory }}
- - name: Upload build
+ - name: '⬆️ Upload Build Artifacts'
uses: actions/upload-artifact@v4
with:
name: test-dist
path: ${{ inputs.working-directory }}/dist/
- - name: Check Version
+ - name: 'πŸ” Extract Version Information'
id: check-version
shell: python
working-directory: ${{ inputs.working-directory }}
diff --git a/.github/workflows/api_doc_build.yml b/.github/workflows/api_doc_build.yml
index 5a1265613c..c97b4e5e19 100644
--- a/.github/workflows/api_doc_build.yml
+++ b/.github/workflows/api_doc_build.yml
@@ -1,13 +1,15 @@
-name: API Docs Build
+name: 'πŸ“š API Documentation Build'
+# Runs daily or can be triggered manually for immediate updates
on:
workflow_dispatch:
schedule:
- - cron: '0 13 * * *'
+ - cron: '0 13 * * *' # Daily at 1PM UTC
env:
PYTHON_VERSION: "3.11"
jobs:
+ # Only runs on main repository to prevent unnecessary builds on forks
build:
if: github.repository == 'langchain-ai/langchain' || github.event_name != 'schedule'
runs-on: ubuntu-latest
@@ -23,7 +25,7 @@ jobs:
path: langchain-api-docs-html
token: ${{ secrets.TOKEN_GITHUB_API_DOCS_HTML }}
- - name: Get repos with yq
+ - name: 'πŸ“‹ Extract Repository List with yq'
id: get-unsorted-repos
uses: mikefarah/yq@master
with:
@@ -42,7 +44,7 @@ jobs:
| .repo
' langchain/libs/packages.yml
- - name: Parse YAML and checkout repos
+ - name: 'πŸ“‹ Parse YAML & Checkout Repositories'
env:
REPOS_UNSORTED: ${{ steps.get-unsorted-repos.outputs.result }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -70,39 +72,39 @@ jobs:
git clone --depth 1 https://github.com/$repo.git $REPO_NAME
done
- - name: Setup Python ${{ env.PYTHON_VERSION }}
+ - name: '🐍 Setup Python ${{ env.PYTHON_VERSION }}'
uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ env.PYTHON_VERSION }}
- - name: Install initial py deps
+ - name: 'πŸ“¦ Install Initial Python Dependencies'
working-directory: langchain
run: |
python -m pip install -U uv
python -m uv pip install --upgrade --no-cache-dir pip setuptools pyyaml
- - name: Move libs
+ - name: 'πŸ“¦ Organize Library Directories'
run: python langchain/.github/scripts/prep_api_docs_build.py
- - name: Rm old html
+ - name: '🧹 Remove Old HTML Files'
run:
rm -rf langchain-api-docs-html/api_reference_build/html
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Documentation Dependencies'
working-directory: langchain
run: |
python -m uv pip install $(ls ./libs/partners | xargs -I {} echo "./libs/partners/{}") --overrides ./docs/vercel_overrides.txt
python -m uv pip install libs/core libs/langchain libs/text-splitters libs/community libs/experimental libs/standard-tests
python -m uv pip install -r docs/api_reference/requirements.txt
- - name: Set Git config
+ - name: 'πŸ”§ Configure Git Settings'
working-directory: langchain
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
- - name: Build docs
+ - name: 'πŸ“š Build API Documentation'
working-directory: langchain
run: |
python docs/api_reference/create_api_rst.py
diff --git a/.github/workflows/check-broken-links.yml b/.github/workflows/check-broken-links.yml
index 52bfb6f21a..22a3a22d61 100644
--- a/.github/workflows/check-broken-links.yml
+++ b/.github/workflows/check-broken-links.yml
@@ -1,4 +1,4 @@
-name: Check Broken Links
+name: 'πŸ”— Check Broken Links'
on:
workflow_dispatch:
@@ -14,15 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- - name: Use Node.js 18.x
+ - name: '🟒 Setup Node.js 18.x'
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
cache-dependency-path: ./docs/yarn.lock
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Node Dependencies'
run: yarn install --immutable --mode=skip-build
working-directory: ./docs
- - name: Check broken links
+ - name: 'πŸ” Scan Documentation for Broken Links'
run: yarn check-broken-links
working-directory: ./docs
diff --git a/.github/workflows/check_core_versions.yml b/.github/workflows/check_core_versions.yml
index c3c0314327..71299549d3 100644
--- a/.github/workflows/check_core_versions.yml
+++ b/.github/workflows/check_core_versions.yml
@@ -1,4 +1,6 @@
-name: Check `core` Version Equality
+name: 'πŸ” Check `core` Version Equality'
+# Ensures version numbers in pyproject.toml and version.py stay in sync
+# Prevents releases with mismatched version numbers
on:
pull_request:
@@ -16,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Check version equality
+ - name: 'βœ… Verify pyproject.toml & version.py Match'
run: |
PYPROJECT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' libs/core/pyproject.toml)
VERSION_PY_VERSION=$(grep -Po '(?<=^VERSION = ")[^"]*' libs/core/langchain_core/version.py)
diff --git a/.github/workflows/check_diffs.yml b/.github/workflows/check_diffs.yml
index 2b726e1b9c..73ecb81335 100644
--- a/.github/workflows/check_diffs.yml
+++ b/.github/workflows/check_diffs.yml
@@ -1,4 +1,4 @@
-name: CI
+name: 'πŸ”§ CI'
on:
push:
@@ -6,6 +6,7 @@ on:
pull_request:
merge_group:
+# Optimizes CI performance by canceling redundant workflow runs
# 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.
#
@@ -24,16 +25,23 @@ env:
UV_NO_SYNC: "true"
jobs:
+ # This job analyzes which files changed and creates a dynamic test matrix
+ # to only run tests/lints for the affected packages, improving CI efficiency
build:
+ name: 'Detect Changes & Set Matrix'
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-python@v5
+ - name: 'πŸ“‹ Checkout Code'
+ uses: actions/checkout@v4
+ - name: '🐍 Setup Python 3.11'
+ uses: actions/setup-python@v5
with:
python-version: '3.11'
- - id: files
+ - name: 'πŸ“‚ Get Changed Files'
+ id: files
uses: Ana06/[email protected]
- - id: set-matrix
+ - name: 'πŸ” Analyze Changed Files & Generate Build Matrix'
+ id: set-matrix
run: |
python -m pip install packaging requests
python .github/scripts/check_diff.py ${{ steps.files.outputs.all }} >> $GITHUB_OUTPUT
@@ -45,8 +53,8 @@ jobs:
dependencies: ${{ steps.set-matrix.outputs.dependencies }}
test-doc-imports: ${{ steps.set-matrix.outputs.test-doc-imports }}
test-pydantic: ${{ steps.set-matrix.outputs.test-pydantic }}
+ # Run linting only on packages that have changed files
lint:
- name: cd ${{ matrix.job-configs.working-directory }}
needs: [ build ]
if: ${{ needs.build.outputs.lint != '[]' }}
strategy:
@@ -59,8 +67,8 @@ jobs:
python-version: ${{ matrix.job-configs.python-version }}
secrets: inherit
+ # Run unit tests only on packages that have changed files
test:
- name: cd ${{ matrix.job-configs.working-directory }}
needs: [ build ]
if: ${{ needs.build.outputs.test != '[]' }}
strategy:
@@ -73,8 +81,8 @@ jobs:
python-version: ${{ matrix.job-configs.python-version }}
secrets: inherit
+ # Test compatibility with different Pydantic versions for affected packages
test-pydantic:
- name: cd ${{ matrix.job-configs.working-directory }}
needs: [ build ]
if: ${{ needs.build.outputs.test-pydantic != '[]' }}
strategy:
@@ -95,12 +103,12 @@ jobs:
job-configs: ${{ fromJson(needs.build.outputs.test-doc-imports) }}
fail-fast: false
uses: ./.github/workflows/_test_doc_imports.yml
- secrets: inherit
with:
python-version: ${{ matrix.job-configs.python-version }}
+ secrets: inherit
+ # Verify integration tests compile without actually running them (faster feedback)
compile-integration-tests:
- name: cd ${{ matrix.job-configs.working-directory }}
needs: [ build ]
if: ${{ needs.build.outputs.compile-integration-tests != '[]' }}
strategy:
@@ -113,8 +121,9 @@ jobs:
python-version: ${{ matrix.job-configs.python-version }}
secrets: inherit
+ # Run extended test suites that require additional dependencies
extended-tests:
- name: "cd ${{ matrix.job-configs.working-directory }} / make extended_tests #${{ matrix.job-configs.python-version }}"
+ name: 'Extended Tests'
needs: [ build ]
if: ${{ needs.build.outputs.extended-tests != '[]' }}
strategy:
@@ -130,12 +139,12 @@ jobs:
steps:
- uses: actions/checkout@v4
- - name: Set up Python ${{ matrix.job-configs.python-version }} + uv
+ - name: '🐍 Set up Python ${{ matrix.job-configs.python-version }} + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ matrix.job-configs.python-version }}
- - name: Install dependencies and run extended tests
+ - name: 'πŸ“¦ Install Dependencies & Run Extended Tests'
shell: bash
run: |
echo "Running extended tests, installing dependencies with uv..."
@@ -144,7 +153,7 @@ jobs:
VIRTUAL_ENV=.venv uv pip install -r extended_testing_deps.txt
VIRTUAL_ENV=.venv make extended_tests
- - name: Ensure the tests did not create any additional files
+ - name: '🧹 Verify Clean Working Directory'
shell: bash
run: |
set -eu
@@ -156,8 +165,9 @@ jobs:
# and `set -e` above will cause the step to fail.
echo "$STATUS" | grep 'nothing to commit, working tree clean'
+ # Final status check - ensures all required jobs passed before allowing merge
ci_success:
- name: "CI Success"
+ name: 'βœ… CI Success'
needs: [build, lint, test, compile-integration-tests, extended-tests, test-doc-imports, test-pydantic]
if: |
always()
@@ -167,7 +177,7 @@ jobs:
RESULTS_JSON: ${{ toJSON(needs.*.result) }}
EXIT_CODE: ${{!contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') && '0' || '1'}}
steps:
- - name: "CI Success"
+ - name: 'πŸŽ‰ All Checks Passed'
run: |
echo $JOBS_JSON
echo $RESULTS_JSON
diff --git a/.github/workflows/check_new_docs.yml b/.github/workflows/check_new_docs.yml
index a05b62c733..eab0156d1e 100644
--- a/.github/workflows/check_new_docs.yml
+++ b/.github/workflows/check_new_docs.yml
@@ -1,4 +1,4 @@
-name: Integration Docs Lint
+name: 'πŸ“‘ Integration Docs Lint'
on:
push:
@@ -33,6 +33,6 @@ jobs:
*.ipynb
*.md
*.mdx
- - name: Check new docs
+ - name: 'πŸ” Check New Documentation Templates'
run: |
python docs/scripts/check_templates.py ${{ steps.files.outputs.added }}
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
deleted file mode 100644
index 1135f24786..0000000000
--- a/.github/workflows/codespell.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-name: CI / cd . / make spell_check
-
-on:
- push:
- branches: [master, v0.1, v0.2]
- pull_request:
-
-permissions:
- contents: read
-
-jobs:
- codespell:
- name: (Check for spelling errors)
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Install Dependencies
- run: |
- pip install toml
-
- - name: Extract Ignore Words List
- run: |
- # Use a Python script to extract the ignore words list from pyproject.toml
- python .github/workflows/extract_ignored_words_list.py
- id: extract_ignore_words
-
-# - name: Codespell
-# uses: codespell-project/actions-codespell@v2
-# with:
-# skip: guide_imports.json,*.ambr,./cookbook/data/imdb_top_1000.csv,*.lock
-# ignore_words_list: ${{ steps.extract_ignore_words.outputs.ignore_words_list }}
-# exclude_file: ./.github/workflows/codespell-exclude
diff --git a/.github/workflows/codspeed.yml b/.github/workflows/codspeed.yml
index c738ae286d..c6836d192c 100644
--- a/.github/workflows/codspeed.yml
+++ b/.github/workflows/codspeed.yml
@@ -1,4 +1,4 @@
-name: CodSpeed
+name: '⚑ CodSpeed'
on:
push:
@@ -18,7 +18,7 @@ env:
jobs:
codspeed:
- name: Run benchmarks
+ name: 'Benchmark'
runs-on: ubuntu-latest
strategy:
matrix:
@@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v4
# We have to use 3.12 as 3.13 is not yet supported
- - name: Install uv
+ - name: 'πŸ“¦ Install UV Package Manager'
uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
@@ -47,11 +47,11 @@ jobs:
with:
python-version: "3.12"
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Test Dependencies'
run: uv sync --group test
working-directory: ${{ matrix.working-directory }}
- - name: Run benchmarks ${{ matrix.working-directory }}
+ - name: '⚑ Run Benchmarks: ${{ matrix.working-directory }}'
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
diff --git a/.github/workflows/people.yml b/.github/workflows/people.yml
index dd87437ea0..fe6a56fc8f 100644
--- a/.github/workflows/people.yml
+++ b/.github/workflows/people.yml
@@ -1,4 +1,4 @@
-name: LangChain People
+name: 'πŸ‘₯ LangChain People'
on:
schedule:
@@ -14,13 +14,13 @@ jobs:
permissions:
contents: write
steps:
- - name: Dump GitHub context
+ - name: 'πŸ“‹ Dump GitHub Context'
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v4
# Ref: https://github.com/actions/runner/issues/2033
- - name: Fix git safe.directory in container
+ - name: 'πŸ”§ Fix Git Safe Directory in Container'
run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" > /home/runner/work/_temp/_github_home/.gitconfig
- uses: ./.github/actions/people
with:
diff --git a/.github/workflows/pr_lint.yml b/.github/workflows/pr_lint.yml
index f3545d68bf..33b98b0919 100644
--- a/.github/workflows/pr_lint.yml
+++ b/.github/workflows/pr_lint.yml
@@ -4,6 +4,7 @@
# Purpose:
# Enforces Conventional Commits format for pull request titles to maintain a
# clear, consistent, and machine-readable change history across our repository.
+# This helps with automated changelog generation and semantic versioning.
#
# Enforced Commit Message Format (Conventional Commits 1.0.0):
# <type>[optional scope]: <description>
@@ -45,7 +46,7 @@
# β€’ Conventional Commits spec: https://www.conventionalcommits.org/en/v1.0.0/
# -----------------------------------------------------------------------------
-name: PR Title Lint
+name: '🏷️ PR Title Lint'
permissions:
pull-requests: read
@@ -55,11 +56,12 @@ on:
types: [opened, edited, synchronize]
jobs:
+ # Validates that PR title follows Conventional Commits specification
lint-pr-title:
- name: Validate PR Title
+ name: 'Validate PR Title Format'
runs-on: ubuntu-latest
steps:
- - name: Validate PR Title
+ - name: 'βœ… Validate Conventional Commits Format'
uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/run_notebooks.yml b/.github/workflows/run_notebooks.yml
index 9bfe629eb0..fc5b4fab91 100644
--- a/.github/workflows/run_notebooks.yml
+++ b/.github/workflows/run_notebooks.yml
@@ -1,4 +1,4 @@
-name: Run Notebooks
+name: 'πŸ“ Run Documentation Notebooks'
on:
workflow_dispatch:
@@ -24,43 +24,43 @@ jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'langchain-ai/langchain' || github.event_name != 'schedule'
- name: "Test docs"
+ name: 'πŸ“‘ Test Documentation Notebooks'
steps:
- uses: actions/checkout@v4
- - name: Set up Python + uv
+ - name: '🐍 Set up Python + UV'
uses: "./.github/actions/uv_setup"
with:
python-version: ${{ github.event.inputs.python_version || '3.11' }}
- - name: 'Authenticate to Google Cloud'
+ - name: 'πŸ” Authenticate to Google Cloud'
id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- - name: Configure AWS Credentials
+ - name: 'πŸ” Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- - name: Install dependencies
+ - name: 'πŸ“¦ Install Dependencies'
run: |
uv sync --group dev --group test
- - name: Pre-download files
+ - name: 'πŸ“¦ Pre-download Test Files'
run: |
uv run python docs/scripts/cache_data.py
curl -s https://raw.githubusercontent.com/lerocha/chinook-database/master/ChinookDatabase/DataSources/Chinook_Sqlite.sql | sqlite3 docs/docs/how_to/Chinook.db
cp docs/docs/how_to/Chinook.db docs/docs/tutorials/Chinook.db
- - name: Prepare notebooks
+ - name: 'πŸ”§ Prepare Notebooks for CI'
run: |
uv run python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells --working-directory ${{ github.event.inputs.working-directory || 'all' }}
- - name: Run notebooks
+ - name: 'πŸš€ Execute Notebooks'
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
diff --git a/.github/workflows/scheduled_test.yml b/.github/workflows/scheduled_test.yml
index 4f2b581364..99662af8f0 100644
--- a/.github/workflows/scheduled_test.yml
+++ b/.github/workflows/scheduled_test.yml
@@ -1,7 +1,7 @@
-name: Scheduled Tests
+name: '⏰ Scheduled Integration Tests'
on:
- workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
+ workflow_dispatch: # Allows maintainers to trigger the workflow manually in GitHub UI
inputs:
working-directory-force:
type: string
@@ -10,7 +10,7 @@ on:
type: string
description: "Python version to use - defaults to 3.9 and 3.11 in matrix - example value: 3.9"
schedule:
- - cron: '0 13 * * *'
+ - cron: '0 13 * * *' # Runs daily at 1PM UTC (9AM EDT/6AM PDT)
permissions:
contents: read
@@ -22,14 +22,16 @@ env:
POETRY_LIBS: ("libs/partners/google-vertexai" "libs/partners/google-genai" "libs/partners/aws")
jobs:
+ # Generate dynamic test matrix based on input parameters or defaults
+ # Only runs on the main repo (for scheduled runs) or when manually triggered
compute-matrix:
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
runs-on: ubuntu-latest
- name: Compute matrix
+ name: 'πŸ“‹ Compute Test Matrix'
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- - name: Set matrix
+ - name: 'πŸ”’ Generate Python & Library Matrix'
id: set-matrix
env:
DEFAULT_LIBS: ${{ env.DEFAULT_LIBS }}
@@ -50,9 +52,11 @@ jobs:
matrix="{\"python-version\": $python_version, \"working-directory\": $working_directory}"
echo $matrix
echo "matrix=$matrix" >> $GITHUB_OUTPUT
+ # Run integration tests against partner libraries with live API credentials
+ # Tests are run with both Poetry and UV depending on the library's setup
build:
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
- name: Python ${{ matrix.python-version }} - ${{ matrix.working-directory }}
+ name: '🐍 Python ${{ matrix.python-version }}: ${{ matrix.working-directory }}'
runs-on: ubuntu-latest
needs: [compute-matrix]
timeout-minutes: 20
@@ -75,7 +79,7 @@ jobs:
repository: langchain-ai/langchain-aws
path: langchain-aws
- - name: Move libs
+ - name: 'πŸ“¦ Organize External Libraries'
run: |
rm -rf \
langchain/libs/partners/google-genai \
@@ -84,7 +88,7 @@ jobs:
mv langchain-google/libs/vertexai langchain/libs/partners/google-vertexai
mv langchain-aws/libs/aws langchain/libs/partners/aws
- - name: Set up Python ${{ matrix.python-version }} with poetry
+ - name: '🐍 Set up Python ${{ matrix.python-version }} + Poetry'
if: contains(env.POETRY_LIBS, matrix.working-directory)
uses: "./langchain/.github/actions/poetry_setup"
with:
@@ -93,40 +97,40 @@ jobs:
working-directory: langchain/${{ matrix.working-directory }}
cache-key: scheduled
- - name: Set up Python ${{ matrix.python-version }} + uv
+ - name: '🐍 Set up Python ${{ matrix.python-version }} + UV'
if: "!contains(env.POETRY_LIBS, matrix.working-directory)"
uses: "./langchain/.github/actions/uv_setup"
with:
python-version: ${{ matrix.python-version }}
- - name: 'Authenticate to Google Cloud'
+ - name: 'πŸ” Authenticate to Google Cloud'
id: 'auth'
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- - name: Configure AWS Credentials
+ - name: 'πŸ” Configure AWS Credentials'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- - name: Install dependencies (poetry)
+ - name: 'πŸ“¦ Install Dependencies (Poetry)'
if: contains(env.POETRY_LIBS, matrix.working-directory)
run: |
echo "Running scheduled tests, installing dependencies with poetry..."
cd langchain/${{ matrix.working-directory }}
poetry install --with=test_integration,test
- - name: Install dependencies (uv)
+ - name: 'πŸ“¦ Install Dependencies (UV)'
if: "!contains(env.POETRY_LIBS, matrix.working-directory)"
run: |
echo "Running scheduled tests, installing dependencies with uv..."
cd langchain/${{ matrix.working-directory }}
uv sync --group test --group test_integration
- - name: Run integration tests
+ - name: 'πŸš€ Run Integration Tests'
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
@@ -155,14 +159,15 @@ jobs:
cd langchain/${{ matrix.working-directory }}
make integration_tests
- - name: Remove external libraries
+ - name: '🧹 Clean up External Libraries'
+ # Clean up external libraries to avoid affecting git status check
run: |
rm -rf \
langchain/libs/partners/google-genai \
langchain/libs/partners/google-vertexai \
langchain/libs/partners/aws
- - name: Ensure tests did not create additional files
+ - name: '🧹 Verify Clean Working Directory'
working-directory: langchain
run: |
set -eu