From 2e3203fdff59f677cd0a350b7b97a752fee82b6c Mon Sep 17 00:00:00 2001 From: Avasam Date: Fri, 8 Aug 2025 06:11:44 -0400 Subject: [PATCH] Use uv action rather than install script (#14530) --- .github/workflows/meta_tests.yml | 12 +++++++++--- .github/workflows/stubsabot.yml | 4 +++- .github/workflows/tests.yml | 12 +++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/meta_tests.yml b/.github/workflows/meta_tests.yml index 8ac417297..136979c40 100644 --- a/.github/workflows/meta_tests.yml +++ b/.github/workflows/meta_tests.yml @@ -39,7 +39,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.13" - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - run: uv pip install -r requirements-tests.txt --system - run: python ./tests/typecheck_typeshed.py --platform=${{ matrix.platform }} pyright: @@ -54,7 +56,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.13" - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - run: uv pip install -r requirements-tests.txt --system - name: Run pyright on typeshed uses: jakebailey/pyright-action@v2 @@ -71,7 +75,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.13" - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - name: Git config run: | git config --global user.name stubsabot diff --git a/.github/workflows/stubsabot.yml b/.github/workflows/stubsabot.yml index 3648d5168..afe21e715 100644 --- a/.github/workflows/stubsabot.yml +++ b/.github/workflows/stubsabot.yml @@ -27,7 +27,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.13" - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - name: git config run: | git config --global user.name stubsabot diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c736d18e1..c37f8ff23 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.13" - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - run: uv pip install -r requirements-tests.txt --system - run: python ./tests/check_typeshed_structure.py @@ -48,7 +50,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - run: uv pip install -r requirements-tests.txt --system - name: Install required APT packages run: | @@ -81,7 +85,9 @@ jobs: # Use py311 for now, as py312 seems to be around 30s slower in CI # TODO: figure out why that is (#11590) python-version: "3.11" - - run: curl -LsSf https://astral.sh/uv/install.sh | sh + - uses: astral-sh/setup-uv@v6 + with: + version-file: "requirements-tests.txt" - run: uv pip install -r requirements-tests.txt --system - run: python ./tests/regr_test.py --all --verbosity QUIET