From d029add04ed08326b756f0f2703a74d938bbc5d3 Mon Sep 17 00:00:00 2001 From: ADBond <48208438+ADBond@users.noreply.github.com> Date: Thu, 12 Sep 2024 20:53:42 +0100 Subject: [PATCH] mypy action - uv --- .github/workflows/type-hinting.yaml | 40 ++++++++--------------------- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/.github/workflows/type-hinting.yaml b/.github/workflows/type-hinting.yaml index ecb8e46..dddbcf6 100644 --- a/.github/workflows/type-hinting.yaml +++ b/.github/workflows/type-hinting.yaml @@ -15,37 +15,19 @@ jobs: - name: Check out repository uses: actions/checkout@v3 - - name: Set up python - id: setup-python - uses: actions/setup-python@v4 - with: - python-version: 3.9.10 - - name: Load cached Poetry installation - uses: actions/cache@v2 - with: - path: ~/.local - key: poetry-0 - - name: Install Poetry - uses: snok/install-poetry@v1 - with: - version: 1.8.2 - virtualenvs-create: true - virtualenvs-in-project: true - installer-parallel: true - - name: Load cached venv - id: cached-poetry-dependencies - uses: actions/cache@v2 + - name: Setup uv + id: setup-uv + uses: astral-sh/setup-uv@v2 with: - path: .venv - key: venv-typehint-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-00 + enable-cache: true + cache-dependency-glob: "uv.lock" + + - name: Install Python 3.9.10 + run: uv python install 3.9.10 + - name: Install dependencies - if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' - run: poetry install --no-interaction --no-root - - name: Install library - run: poetry install --no-interaction + run: uv sync -p 3.9.10 - name: Run mypy - run: | - source .venv/bin/activate - mypy splinkclickhouse + run: uv run python -m mypy splinkclickhouse