From b6e4cdd8f78476898e4e985a3b8ce3d90d6aba30 Mon Sep 17 00:00:00 2001 From: Jasper Ginn Date: Sat, 19 Oct 2024 20:03:50 +0200 Subject: [PATCH] build: use uv with pyright --- .../templates/pyright_type_checks/action.yaml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/templates/pyright_type_checks/action.yaml b/.github/workflows/templates/pyright_type_checks/action.yaml index f43a585..9a31a55 100644 --- a/.github/workflows/templates/pyright_type_checks/action.yaml +++ b/.github/workflows/templates/pyright_type_checks/action.yaml @@ -6,6 +6,9 @@ inputs: description: "Python version to use." required: false default: "3.11" + uv_version: + description: "uv version to use." + required: true pyright_version: description: "Pre-commit version to use." required: false @@ -19,15 +22,15 @@ runs: uses: actions/setup-python@v5 with: python-version: ${{ inputs.python_version }} - - name: Create virtual environment - run: python3 -m venv venv && source venv/bin/activate - shell: bash - - name: Install pyright + - name: Install uv + uses: astral-sh/setup-uv@v2 + with: + uv-version: ${{ inputs.uv_version }} + - name: install dependencies run: | - python3 -m pip install --upgrade pip - python3 -m pip install pyright==${{ inputs.pyright_version }} + uv sync --all-extras shell: bash - name: Run pyright run: | - python3 -m pyright + uv run pyright shell: bash