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
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install uv
|
- uses: astral-sh/setup-uv@v3
|
||||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
||||||
- name: Cache uv
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/uv
|
version: "latest"
|
||||||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
enable-cache: true
|
||||||
restore-keys: |
|
|
||||||
uv-${{ runner.os }}-
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: $HOME/.local/bin/uv sync --frozen --group dev
|
run: uv sync --frozen --group dev
|
||||||
- name: Ruff check
|
- name: Ruff check
|
||||||
run: $HOME/.local/bin/uv run ruff check services/
|
run: uv run ruff check services/
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
name: mypy mcp_common
|
name: mypy mcp_common
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install uv
|
- uses: astral-sh/setup-uv@v3
|
||||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
||||||
- name: Cache uv
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/uv
|
version: "latest"
|
||||||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
enable-cache: true
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: $HOME/.local/bin/uv sync --frozen --group dev
|
run: uv sync --frozen --group dev
|
||||||
- name: Mypy on mcp_common (gating)
|
- 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)
|
- name: Mypy on services (warn-only)
|
||||||
run: $HOME/.local/bin/uv run mypy services/ || true
|
run: uv run mypy services/ || true
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: pytest
|
name: pytest
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Install uv
|
- uses: astral-sh/setup-uv@v3
|
||||||
run: curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
||||||
- name: Cache uv
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/uv
|
version: "latest"
|
||||||
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
|
enable-cache: true
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: $HOME/.local/bin/uv sync --frozen --group dev
|
run: uv sync --frozen --group dev
|
||||||
- name: Pytest full suite
|
- name: Pytest full suite
|
||||||
run: $HOME/.local/bin/uv run pytest services/ --tb=short
|
run: uv run pytest services/ --tb=short
|
||||||
|
|
||||||
validate-config:
|
validate-config:
|
||||||
name: validate compose + Caddyfile
|
name: validate compose + Caddyfile
|
||||||
|
|||||||
Reference in New Issue
Block a user