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
parent 4ba20a8de3
commit b378eb81d0
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:
fetch-depth: 0
- 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
- name: Run Codeflash Optimizer
working-directory: ./src/backend/base
continue-on-error: true
run: uv run codeflash
- name: Minimize uv cache
run: uv cache prune --ci

View File

@@ -39,6 +39,7 @@ on:
required: true
type: string
pre_release:
description: "Whether this is a pre-release."
required: false
type: boolean
default: false
@@ -49,7 +50,7 @@ on:
env:
POETRY_VERSION: "1.8.2"
PYTHON_VERSION: "3.13"
TEST_TAG: "langflowai/langflow:test"
jobs:
@@ -191,7 +192,12 @@ jobs:
ref: ${{ inputs.ref || inputs.main_version || github.ref }}
persist-credentials: true
- 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
run: |
if [[ "${{ inputs.release_type }}" == "base" || "${{ inputs.release_type }}" == "nightly-base" ]]; then
@@ -337,9 +343,12 @@ jobs:
with:
ref: ${{ inputs.ref || inputs.main_version || github.ref }}
- 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
- name: Restart HuggingFace Spaces Build
run: |

View File

@@ -44,9 +44,12 @@ jobs:
with:
ref: ${{ inputs.ref || github.ref }}
- 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
- name: Run integration tests with api keys
timeout-minutes: 20
run: |

View File

@@ -30,9 +30,12 @@ jobs:
ref: ${{ inputs.branch || github.ref }}
persist-credentials: true
- 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
- name: Install the project
run: uv sync
- name: Run Mypy
@@ -40,5 +43,4 @@ jobs:
uv run mypy --namespace-packages -p "langflow"
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
- name: Minimize uv cache
run: uv cache prune --ci

View File

@@ -29,7 +29,12 @@ jobs:
with:
persist-credentials: true
- 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
run: uv sync

View File

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

View File

@@ -48,9 +48,12 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
- 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
- name: Install the project
run: uv sync
- name: Run unit tests
@@ -59,8 +62,7 @@ jobs:
timeout_minutes: 12
max_attempts: 2
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:
name: Integration Tests - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
@@ -72,15 +74,17 @@ jobs:
with:
ref: ${{ inputs.ref || github.ref }}
- 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
- name: Install the project
run: uv sync
- name: Run integration tests
run: make integration_tests_no_api_keys
- name: Minimize uv cache
run: uv cache prune --ci
test-cli:
name: Test CLI - Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
@@ -93,9 +97,12 @@ jobs:
with:
ref: ${{ inputs.ref || github.ref }}
- 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
- name: Check Version
id: check-version
@@ -145,5 +152,4 @@ jobs:
else
echo "Server terminated successfully"
fi
- name: Minimize uv cache
run: uv cache prune --ci

View File

@@ -63,7 +63,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- 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
run: uv sync
- name: Check Version
@@ -127,7 +132,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- 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
run: uv sync

View File

@@ -73,7 +73,12 @@ jobs:
ref: ${{ inputs.nightly_tag_main }}
persist-credentials: true
- 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
run: uv sync
@@ -150,7 +155,12 @@ jobs:
ref: ${{ inputs.nightly_tag_main}}
persist-credentials: true
- 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
run: uv sync

View File

@@ -23,15 +23,19 @@ jobs:
steps:
- uses: actions/checkout@v4
- 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
run: uv sync
- name: Run unit tests
id: run_tests
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
- name: Minimize uv cache
run: uv cache prune --ci
- name: Close existing PRs
uses: actions/github-script@v7

View File

@@ -18,12 +18,14 @@ jobs:
- name: Check out the code at a specific ref
uses: actions/checkout@v4
- 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
- name: Register problem matcher
run: echo "::add-matcher::.github/workflows/matchers/ruff.json"
- name: Run Ruff Check
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
npx playwright install --with-deps chromium
- name: Setup Python Environment with UV
uses: ./.github/actions/setup-uv
- name: "Setup Environment"
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
run: uv sync