chore(ci): replace local uv setup action with astral-sh/setup-uv@v6 (#8491)

* chore: remove setup-uv action configuration file as it is no longer needed

* chore: update setup-uv action to use the official action across all workflows

* chore: disable cache pruning in all workflows to improve build stability

* chore: update Python version to 3.13 and add pre-release description in workflows
This commit is contained in:
Gabriel Luiz Freitas Almeida 2025-06-11 15:56:04 -03:00 • committed by GitHub
commit b378eb81d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 94 additions and 53 deletions

View file

@ -1,17 +0,0 @@
name: "Setup uv"
description: "Checks out code, installs uv, and sets up Python environment"
inputs:
python-version:
description: "Python version to use"
default: "3.13"
runs:
using: "composite"
steps:
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ inputs.python-version }}

View file

@ -23,11 +23,15 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }}
prune-cache: false
- run: uv sync - run: uv sync
- name: Run Codeflash Optimizer - name: Run Codeflash Optimizer
working-directory: ./src/backend/base working-directory: ./src/backend/base
continue-on-error: true continue-on-error: true
run: uv run codeflash run: uv run codeflash
- name: Minimize uv cache
run: uv cache prune --ci

View file

@ -39,6 +39,7 @@ on:
required: true required: true
type: string type: string
pre_release: pre_release:
description: "Whether this is a pre-release."
required: false required: false
type: boolean type: boolean
default: false default: false
@ -49,7 +50,7 @@ on:
env: env:
POETRY_VERSION: "1.8.2" PYTHON_VERSION: "3.13"
TEST_TAG: "langflowai/langflow:test" TEST_TAG: "langflowai/langflow:test"
jobs: jobs:
@ -191,7 +192,12 @@ jobs:
ref: ${{ inputs.ref || inputs.main_version || github.ref }} ref: ${{ inputs.ref || inputs.main_version || github.ref }}
persist-credentials: true persist-credentials: true
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ env.PYTHON_VERSION }}
prune-cache: false
- name: Install the project - name: Install the project
run: | run: |
if [[ "${{ inputs.release_type }}" == "base" || "${{ inputs.release_type }}" == "nightly-base" ]]; then if [[ "${{ inputs.release_type }}" == "base" || "${{ inputs.release_type }}" == "nightly-base" ]]; then
@ -337,9 +343,12 @@ jobs:
with: with:
ref: ${{ inputs.ref || inputs.main_version || github.ref }} ref: ${{ inputs.ref || inputs.main_version || github.ref }}
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Restart HuggingFace Spaces Build - name: Restart HuggingFace Spaces Build
run: | run: |

View file

@ -44,9 +44,12 @@ jobs:
with: with:
ref: ${{ inputs.ref || github.ref }} ref: ${{ inputs.ref || github.ref }}
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Run integration tests with api keys - name: Run integration tests with api keys
timeout-minutes: 20 timeout-minutes: 20
run: | run: |

View file

@ -30,9 +30,12 @@ jobs:
ref: ${{ inputs.branch || github.ref }} ref: ${{ inputs.branch || github.ref }}
persist-credentials: true persist-credentials: true
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync
- name: Run Mypy - name: Run Mypy
@ -40,5 +43,4 @@ jobs:
uv run mypy --namespace-packages -p "langflow" uv run mypy --namespace-packages -p "langflow"
env: env:
GITHUB_TOKEN: ${{ secrets.github_token }} GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Minimize uv cache
run: uv cache prune --ci

View file

@ -29,7 +29,12 @@ jobs:
with: with:
persist-credentials: true persist-credentials: true
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ env.PYTHON_VERSION }}
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync

View file

@ -17,8 +17,7 @@ jobs:
- run: uv run ruff check --fix-only . - run: uv run ruff check --fix-only .
- run: uv run ruff format . --config pyproject.toml - run: uv run ruff format . --config pyproject.toml
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef - uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
- name: Minimize uv cache
run: uv cache prune --ci
update-starter-projects: update-starter-projects:
name: Update Starter Projects name: Update Starter Projects
@ -38,6 +37,5 @@ jobs:
- uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef - uses: autofix-ci/action@551dded8c6cc8a1054039c8bc0b8b48c51dfc6ef
- name: Minimize uv cache
run: uv cache prune --ci

View file

@ -48,9 +48,12 @@ jobs:
with: with:
node-version: ${{ env.NODE_VERSION }} node-version: ${{ env.NODE_VERSION }}
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync
- name: Run unit tests - name: Run unit tests
@ -59,8 +62,7 @@ jobs:
timeout_minutes: 12 timeout_minutes: 12
max_attempts: 2 max_attempts: 2
command: make unit_tests args="-x -vv --splits ${{ matrix.splitCount }} --group ${{ matrix.group }} --reruns 5" command: make unit_tests args="-x -vv --splits ${{ matrix.splitCount }} --group ${{ matrix.group }} --reruns 5"
- name: Minimize uv cache
run: uv cache prune --ci
integration-tests: integration-tests:
name: Integration Tests - Python ${{ matrix.python-version }} name: Integration Tests - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -72,15 +74,17 @@ jobs:
with: with:
ref: ${{ inputs.ref || github.ref }} ref: ${{ inputs.ref || github.ref }}
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync
- name: Run integration tests - name: Run integration tests
run: make integration_tests_no_api_keys run: make integration_tests_no_api_keys
- name: Minimize uv cache
run: uv cache prune --ci
test-cli: test-cli:
name: Test CLI - Python ${{ matrix.python-version }} name: Test CLI - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -93,9 +97,12 @@ jobs:
with: with:
ref: ${{ inputs.ref || github.ref }} ref: ${{ inputs.ref || github.ref }}
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Check Version - name: Check Version
id: check-version id: check-version
@ -145,5 +152,4 @@ jobs:
else else
echo "Server terminated successfully" echo "Server terminated successfully"
fi fi
- name: Minimize uv cache
run: uv cache prune --ci

View file

@ -63,7 +63,12 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Environment - name: Setup Environment
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: "3.13"
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync
- name: Check Version - name: Check Version
@ -127,7 +132,12 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Setup Environment - name: Setup Environment
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: "3.13"
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync

View file

@ -73,7 +73,12 @@ jobs:
ref: ${{ inputs.nightly_tag_main }} ref: ${{ inputs.nightly_tag_main }}
persist-credentials: true persist-credentials: true
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ env.PYTHON_VERSION }}
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync
@ -150,7 +155,12 @@ jobs:
ref: ${{ inputs.nightly_tag_main}} ref: ${{ inputs.nightly_tag_main}}
persist-credentials: true persist-credentials: true
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ env.PYTHON_VERSION }}
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync

View file

@ -23,15 +23,19 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: "3.13"
prune-cache: false
- name: Install the project - name: Install the project
run: uv sync run: uv sync
- name: Run unit tests - name: Run unit tests
id: run_tests id: run_tests
continue-on-error: true continue-on-error: true
run: uv run pytest src/backend/tests/unit --timeout=120 --durations-path src/backend/tests/.test_durations --splitting-algorithm least_duration --store-durations run: uv run pytest src/backend/tests/unit --timeout=120 --durations-path src/backend/tests/.test_durations --splitting-algorithm least_duration --store-durations
- name: Minimize uv cache
run: uv cache prune --ci
- name: Close existing PRs - name: Close existing PRs
uses: actions/github-script@v7 uses: actions/github-script@v7

View file

@ -18,12 +18,14 @@ jobs:
- name: Check out the code at a specific ref - name: Check out the code at a specific ref
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: "Setup Environment" - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with: with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
prune-cache: false
- name: Register problem matcher - name: Register problem matcher
run: echo "::add-matcher::.github/workflows/matchers/ruff.json" run: echo "::add-matcher::.github/workflows/matchers/ruff.json"
- name: Run Ruff Check - name: Run Ruff Check
run: uv run --only-dev ruff check --output-format=github . run: uv run --only-dev ruff check --output-format=github .
- name: Minimize uv cache
run: uv cache prune --ci

View file

@ -292,8 +292,13 @@ jobs:
cd ./src/frontend cd ./src/frontend
npx playwright install --with-deps chromium npx playwright install --with-deps chromium
- name: Setup Python Environment with UV - name: "Setup Environment"
uses: ./.github/actions/setup-uv uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ env.PYTHON_VERSION }}
prune-cache: false
- name: Install Python Dependencies - name: Install Python Dependencies
run: uv sync run: uv sync