Files
scaffold/template/.github/workflows/ci.yml.jinja
T
baozaotumao 39fe248f9f feat: 重组为标准 skill 包结构 + 修复 verify.sh bash 3.2 兼容
- 新增 .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 入库
2026-06-01 21:19:45 -07:00

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 %}