39fe248f9f
- 新增 .claude/skills/new-project/SKILL.md(标准 skill 格式) - install-skill.sh 安装时组装 SKILL.md + verify.sh,单一源无重复 - verify.sh 改用索引数组替代 declare -A,兼容 macOS bash 3.2 - log_pass/log_skip 显式 return 0,避免 set -e 下非 verbose 误退出 - README 改为 skill 优先;补全 copier.yml/scripts/template 入库
70 lines
1.7 KiB
Django/Jinja
70 lines
1.7 KiB
Django/Jinja
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
{%- if include_backend %}
|
|
backend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v3
|
|
with:
|
|
python-version: "{{ python_version }}"
|
|
- run: uv sync
|
|
- run: uv run ruff check src
|
|
- run: uv run ruff format --check src
|
|
- run: uv run mypy src
|
|
- run: uv run pip-audit
|
|
{%- if database == 'sqlite' %}
|
|
- run: uv run alembic upgrade head
|
|
{%- endif %}
|
|
- run: uv run pytest --cov=src --cov-fail-under=80
|
|
{%- endif %}
|
|
|
|
{%- if include_agent %}
|
|
agent:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: agent
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v3
|
|
with:
|
|
python-version: "{{ python_version }}"
|
|
- run: uv sync
|
|
- run: uv run ruff check src
|
|
- run: uv run ruff format --check src
|
|
- run: uv run mypy src
|
|
- run: uv run pip-audit
|
|
- run: uv run pytest --cov=src --cov-fail-under=80
|
|
{%- endif %}
|
|
|
|
{%- if include_frontend %}
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: pnpm/action-setup@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: {{ node_version }}
|
|
cache: pnpm
|
|
cache-dependency-path: frontend/pnpm-lock.yaml
|
|
- run: pnpm install --frozen-lockfile
|
|
- run: pnpm audit --audit-level high
|
|
- run: pnpm lint
|
|
- run: pnpm typecheck
|
|
- run: pnpm test:run --coverage
|
|
- run: pnpm build
|
|
{%- endif %}
|