mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-21 15:12:26 +02:00
Extract a composite GitHub Action for Python + uv setup, replacing 12
scattered `astral-sh/setup-uv@v7` calls with a single reusable
`uv_setup` action that scopes cache dependency globs per library. Also
tightens issue template language and fixes a broken expression in the
release-test workflow.
## Changes
- Add `.github/actions/uv_setup/action.yml` — composite action wrapping
`astral-sh/setup-uv@v7` with a `working-directory` input that scopes
`cache-dependency-glob` to `<dir>/pyproject.toml`, `<dir>/uv.lock`, and
`<dir>/requirements*.txt`
- Migrate all workflow files (`_test.yml`, `_lint.yml`,
`_test_langgraph.yml`, `_integration_test.yml`, `baseline.yml`,
`bench.yml`, `ci.yml`, `release.yml`, `_test_release.yml`,
`uv_lock_ugprade.yml`) from inline `astral-sh/setup-uv@v7` to
`./.github/actions/uv_setup`, passing library-specific
`working-directory` for cache scoping
- Fix typo in `_test_release.yml` step name: `$${ env.PYTHON_VERSION }}`
→ `${{ env.PYTHON_VERSION }}`
- Disable uv cache for the release smoke-test job (`enable-cache:
false`) since it installs from PyPI, not the local lockfile
- Update `config.yml` API reference URL to point to `/python/langgraph/`
instead of `/python/`
- Tighten `privileged.yml` — shorter description, add English language
policy link, add "do not begin work unless assigned" notice
36 lines
1.0 KiB
YAML
36 lines
1.0 KiB
YAML
# Helper to set up Python and uv with caching
|
|
|
|
name: uv-install
|
|
description: Set up Python and uv with caching
|
|
|
|
inputs:
|
|
python-version:
|
|
description: Python version, supporting MAJOR.MINOR only
|
|
required: true
|
|
enable-cache:
|
|
description: Enable caching for uv dependencies
|
|
required: false
|
|
default: "true"
|
|
cache-suffix:
|
|
description: Custom cache key suffix for cache invalidation
|
|
required: false
|
|
default: ""
|
|
working-directory:
|
|
description: Working directory for cache glob scoping
|
|
required: false
|
|
default: "**"
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install uv and set the python version
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
python-version: ${{ inputs.python-version }}
|
|
enable-cache: ${{ inputs.enable-cache }}
|
|
cache-dependency-glob: |
|
|
${{ inputs.working-directory }}/pyproject.toml
|
|
${{ inputs.working-directory }}/uv.lock
|
|
${{ inputs.working-directory }}/requirements*.txt
|
|
cache-suffix: ${{ inputs.cache-suffix }}
|