From 884fdc2fa87fd4806367d8b5179167e303041430 Mon Sep 17 00:00:00 2001 From: lyzno1 <92089059+lyzno1@users.noreply.github.com> Date: Tue, 26 Aug 2025 11:55:17 +0800 Subject: [PATCH] chore: standardize to official astral-sh/setup-uv@v6 action (#24527) --- .github/actions/setup-uv/action.yml | 34 ------------------------- .github/workflows/api-tests.yml | 5 ++-- .github/workflows/autofix.yml | 4 ++- .github/workflows/db-migration-test.yml | 6 +++-- .github/workflows/style.yml | 5 ++-- .github/workflows/vdb-tests.yml | 5 ++-- 6 files changed, 16 insertions(+), 43 deletions(-) delete mode 100644 .github/actions/setup-uv/action.yml diff --git a/.github/actions/setup-uv/action.yml b/.github/actions/setup-uv/action.yml deleted file mode 100644 index 6990f6bec..000000000 --- a/.github/actions/setup-uv/action.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Setup UV and Python - -inputs: - python-version: - description: Python version to use and the UV installed with - required: true - default: '3.12' - uv-version: - description: UV version to set up - required: true - default: '0.8.9' - uv-lockfile: - description: Path to the UV lockfile to restore cache from - required: true - default: '' - enable-cache: - required: true - default: true - -runs: - using: composite - steps: - - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ inputs.python-version }} - - - name: Install uv - uses: astral-sh/setup-uv@v6 - with: - version: ${{ inputs.uv-version }} - python-version: ${{ inputs.python-version }} - enable-cache: ${{ inputs.enable-cache }} - cache-dependency-glob: ${{ inputs.uv-lockfile }} diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml index 63d681e7e..28ef67a13 100644 --- a/.github/workflows/api-tests.yml +++ b/.github/workflows/api-tests.yml @@ -33,10 +33,11 @@ jobs: persist-credentials: false - name: Setup UV and Python - uses: ./.github/actions/setup-uv + uses: astral-sh/setup-uv@v6 with: + enable-cache: true python-version: ${{ matrix.python-version }} - uv-lockfile: api/uv.lock + cache-dependency-glob: api/uv.lock - name: Check UV lockfile run: uv lock --project api --check diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index dada6229d..716c29957 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -15,7 +15,9 @@ jobs: - uses: actions/checkout@v4 # Use uv to ensure we have the same ruff version in CI and locally. - - uses: astral-sh/setup-uv@7edac99f961f18b581bbd960d59d049f04c0002f + - uses: astral-sh/setup-uv@v6 + with: + python-version: "3.12" - run: | cd api uv sync --dev diff --git a/.github/workflows/db-migration-test.yml b/.github/workflows/db-migration-test.yml index 5181546b4..e8ff85e95 100644 --- a/.github/workflows/db-migration-test.yml +++ b/.github/workflows/db-migration-test.yml @@ -25,9 +25,11 @@ jobs: persist-credentials: false - name: Setup UV and Python - uses: ./.github/actions/setup-uv + uses: astral-sh/setup-uv@v6 with: - uv-lockfile: api/uv.lock + enable-cache: true + python-version: "3.12" + cache-dependency-glob: api/uv.lock - name: Install dependencies run: uv sync --project api diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 9aad9558b..8d0ec35ca 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -36,10 +36,11 @@ jobs: - name: Setup UV and Python if: steps.changed-files.outputs.any_changed == 'true' - uses: ./.github/actions/setup-uv + uses: astral-sh/setup-uv@v6 with: - uv-lockfile: api/uv.lock enable-cache: false + python-version: "3.12" + cache-dependency-glob: api/uv.lock - name: Install dependencies if: steps.changed-files.outputs.any_changed == 'true' diff --git a/.github/workflows/vdb-tests.yml b/.github/workflows/vdb-tests.yml index 912267094..f2ca09fba 100644 --- a/.github/workflows/vdb-tests.yml +++ b/.github/workflows/vdb-tests.yml @@ -39,10 +39,11 @@ jobs: remove_tool_cache: true - name: Setup UV and Python - uses: ./.github/actions/setup-uv + uses: astral-sh/setup-uv@v6 with: + enable-cache: true python-version: ${{ matrix.python-version }} - uv-lockfile: api/uv.lock + cache-dependency-glob: api/uv.lock - name: Check UV lockfile run: uv lock --project api --check