mirror of
https://github.com/aljazceru/mcp-python-sdk.git
synced 2025-12-19 06:54:18 +01:00
Use pre-commit on CI (#937)
This commit is contained in:
committed by
GitHub
parent
ba149e34f2
commit
185fa49fd1
33
.github/workflows/shared.yml
vendored
33
.github/workflows/shared.yml
vendored
@@ -4,39 +4,24 @@ on:
|
|||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
format:
|
pre-commit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install uv
|
- uses: astral-sh/setup-uv@v5
|
||||||
uses: astral-sh/setup-uv@v3
|
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
enable-cache: true
|
||||||
version: 0.7.2
|
version: 0.7.2
|
||||||
|
|
||||||
- name: Install the project
|
- name: Install dependencies
|
||||||
run: uv sync --frozen --all-extras --dev --python 3.12
|
run: uv sync --frozen --all-extras --python 3.10
|
||||||
|
|
||||||
- name: Run ruff format check
|
- uses: pre-commit/action@v3.0.0
|
||||||
run: uv run --no-sync ruff check .
|
|
||||||
|
|
||||||
typecheck:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install uv
|
|
||||||
uses: astral-sh/setup-uv@v3
|
|
||||||
with:
|
with:
|
||||||
enable-cache: true
|
extra_args: --all-files --verbose
|
||||||
version: 0.7.2
|
env:
|
||||||
|
SKIP: no-commit-to-branch
|
||||||
- name: Install the project
|
|
||||||
run: uv sync --frozen --all-extras --dev --python 3.12
|
|
||||||
|
|
||||||
- name: Run pyright
|
|
||||||
run: uv run --no-sync pyright
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
@@ -55,7 +40,7 @@ jobs:
|
|||||||
version: 0.7.2
|
version: 0.7.2
|
||||||
|
|
||||||
- name: Install the project
|
- name: Install the project
|
||||||
run: uv sync --frozen --all-extras --dev --python ${{ matrix.python-version }}
|
run: uv sync --frozen --all-extras --python ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Run pytest
|
- name: Run pytest
|
||||||
run: uv run --no-sync pytest
|
run: uv run --no-sync pytest
|
||||||
|
|||||||
Reference in New Issue
Block a user