Skip to content

Commit 4c3ef23

Browse files
authored
ci: 仅运行 Ruff 代码规范检查 (#16)
1 parent 89973fc commit 4c3ef23

1 file changed

Lines changed: 4 additions & 29 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,19 @@
1-
name: Cross-platform CI
1+
name: Ruff
22

33
on:
44
push:
55
pull_request:
66

77
jobs:
8-
python-contracts:
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
os: [ubuntu-latest, macos-latest, windows-latest]
13-
python-version: ["3.12"]
14-
runs-on: ${{ matrix.os }}
8+
ruff:
9+
runs-on: ubuntu-latest
1510
steps:
1611
- uses: actions/checkout@v4
1712
- uses: astral-sh/setup-uv@v7
1813
with:
1914
enable-cache: true
20-
- run: uv python install ${{ matrix.python-version }}
21-
- run: uv sync --python ${{ matrix.python-version }} --frozen --all-groups
15+
- run: uv sync --frozen --only-group dev
2216
- name: Check formatting
2317
run: uv run ruff format --check .
2418
- name: Lint
2519
run: uv run ruff check .
26-
- name: Type check
27-
run: uv run pyright
28-
- name: Check architecture metrics
29-
run: uv run python scripts/architecture_metrics.py --check docs/refactor/architecture-baseline.json
30-
- name: Run tests
31-
run: uv run pytest -q
32-
- name: Build distributions
33-
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
34-
run: uv build
35-
- name: Verify public sandbox and command contracts
36-
run: >-
37-
uv run python -c "import sys; from pathlib import Path;
38-
from windcode.policy import analyze_bash;
39-
from windcode.sandbox import SandboxPreset, create_sandbox_backend;
40-
a=analyze_bash('git status && rm -rf build');
41-
assert a.trusted and a.critical and len(a.actions)==2;
42-
backend, policy=create_sandbox_backend(Path.cwd(), preset=SandboxPreset.WORKSPACE_WRITE);
43-
assert policy.preset is SandboxPreset.WORKSPACE_WRITE;
44-
assert backend is not None"

0 commit comments

Comments
 (0)