mirror of
https://github.com/langchain-ai/docs.git
synced 2026-07-20 00:46:14 -04:00
c57ece47ff
delete folder relocate `packages.yml` and update corresponding scripts
111 lines
4.1 KiB
YAML
111 lines
4.1 KiB
YAML
---
|
|
name: Run CI Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
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: true
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
# Only test on the min and max supported Python versions.
|
|
# It's extremely unlikely that there's a lint issue on any version in between
|
|
# that doesn't show up on the min or max versions.
|
|
#
|
|
# GitHub rate-limits how many jobs can be running at any one time.
|
|
# Starting new jobs is also relatively slow,
|
|
# so linting on fewer versions makes CI faster.
|
|
python-version:
|
|
- "3.13"
|
|
uses:
|
|
./.github/workflows/_test.yml
|
|
with:
|
|
working-directory: "."
|
|
python-version: ${{ matrix.python-version }}
|
|
lint:
|
|
strategy:
|
|
matrix:
|
|
# Only lint on the min and max supported Python versions.
|
|
# It's extremely unlikely that there's a lint issue on any version in between
|
|
# that doesn't show up on the min or max versions.
|
|
#
|
|
# GitHub rate-limits how many jobs can be running at any one time.
|
|
# Starting new jobs is also relatively slow,
|
|
# so linting on fewer versions makes CI faster.
|
|
python-version:
|
|
- "3.13"
|
|
uses:
|
|
./.github/workflows/_lint.yml
|
|
with:
|
|
working-directory: "."
|
|
python-version: ${{ matrix.python-version }}
|
|
links:
|
|
strategy:
|
|
matrix:
|
|
# Only test docs on latest stable Python version since documentation
|
|
# build process doesn't typically vary between Python versions
|
|
python-version:
|
|
- "3.13"
|
|
uses:
|
|
./.github/workflows/_check-links.yml
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
check-generated-files:
|
|
permissions:
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
- name: Skip check for automated updates
|
|
env:
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
run: |
|
|
# Skip validation for automated package download updates
|
|
if [[ "${{ github.actor }}" == "github-actions[bot]" && "$PR_TITLE" == *"update package download counts"* ]]; then
|
|
echo "✅ Skipping check for automated package download update"
|
|
exit 0
|
|
fi
|
|
|
|
# Skip validation if PR has bypass-auto-check label
|
|
if [[ "${{ contains(github.event.pull_request.labels.*.name, 'bypass-auto-check') }}" == "true" ]]; then
|
|
echo "✅ Skipping check due to bypass-auto-check label"
|
|
exit 0
|
|
fi
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
- name: Install dependencies
|
|
run: uv sync --group test
|
|
- name: Regenerate overview.mdx
|
|
run: uv run python pipeline/tools/partner_pkg_table.py
|
|
- name: Check for manual changes to generated files
|
|
run: |
|
|
if ! git diff --exit-code src/oss/python/integrations/providers/overview.mdx; then
|
|
echo "❌ Manual changes detected to src/oss/python/integrations/providers/overview.mdx"
|
|
echo "This file is auto-generated by pipeline/tools/partner_pkg_table.py"
|
|
echo "Please do not manually edit this file. If you need to make changes:"
|
|
echo "1. Update the generation script at pipeline/tools/partner_pkg_table.py"
|
|
echo "2. Or update the package metadata in packages.yml"
|
|
echo "3. Then run: uv run python pipeline/tools/partner_pkg_table.py"
|
|
exit 1
|
|
else
|
|
echo "✅ No manual changes detected to generated files"
|
|
fi
|