ci: usa astral-sh/setup-uv@v3 (cache integrato, no curl|sh fragile)
This commit is contained in:
+16
-27
@@ -16,55 +16,44 @@ jobs:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- name: Cache uv
|
||||
uses: actions/cache@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
path: ~/.cache/uv
|
||||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||
restore-keys: |
|
||||
uv-${{ runner.os }}-
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
- name: Install deps
|
||||
run: $HOME/.local/bin/uv sync --frozen --group dev
|
||||
run: uv sync --frozen --group dev
|
||||
- name: Ruff check
|
||||
run: $HOME/.local/bin/uv run ruff check services/
|
||||
run: uv run ruff check services/
|
||||
|
||||
typecheck:
|
||||
name: mypy mcp_common
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- name: Cache uv
|
||||
uses: actions/cache@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
path: ~/.cache/uv
|
||||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
- name: Install deps
|
||||
run: $HOME/.local/bin/uv sync --frozen --group dev
|
||||
run: uv sync --frozen --group dev
|
||||
- name: Mypy on mcp_common (gating)
|
||||
run: $HOME/.local/bin/uv run mypy services/common/src/mcp_common
|
||||
run: uv run mypy services/common/src/mcp_common
|
||||
- name: Mypy on services (warn-only)
|
||||
run: $HOME/.local/bin/uv run mypy services/ || true
|
||||
run: uv run mypy services/ || true
|
||||
|
||||
test:
|
||||
name: pytest
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install uv
|
||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
- name: Cache uv
|
||||
uses: actions/cache@v4
|
||||
- uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
path: ~/.cache/uv
|
||||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
- name: Install deps
|
||||
run: $HOME/.local/bin/uv sync --frozen --group dev
|
||||
run: uv sync --frozen --group dev
|
||||
- name: Pytest full suite
|
||||
run: $HOME/.local/bin/uv run pytest services/ --tb=short
|
||||
run: uv run pytest services/ --tb=short
|
||||
|
||||
validate-config:
|
||||
name: validate compose + Caddyfile
|
||||
|
||||
Reference in New Issue
Block a user