Files
easy_tdx_max/.github/workflows/ci.yml
T
毛利哥 64d0812257 ci: 新增 frontend job 防前端构建回归(v1.17.9 数值 bug 教训) (#16)
web-ui 此前只有本地 vue-tsc,CI 不覆盖,类型错误 / 破坏性 import
只有发布后用户才发觉。新增独立 frontend job 跑 npm ci + npm run build,
与 Python 版本无关故独立于 test matrix,避免跑 6 遍。

本地 npm run build 验证通过(686 模块,575ms)。
2026-07-05 00:03:14 +08:00

58 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# 项目核心场景是读取 Windows 通达信安装目录下的 .day 文件,
# 路径分隔符 / GBK 文件名 / tzdata 时区行为在 Windows 上与 Linux 不同,
# 故补充 Windows 矩阵覆盖这些平台特有路径。
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install -e ".[dev]"
- run: pip install -r requirements-dev.txt
- run: python -m pytest tests/unit/ -v --tb=short --cov src/easy_tdx --cov-fail-under=60
- run: ruff check src/ tests/
- run: ruff format --check src/ tests/
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install -e ".[dev,web]"
- run: mypy src/
# 前端构建检查。web-ui 此前只有本地 vue-tscCI 不覆盖,
# 类型错误 / 破坏性 import 只有发布后用户才发觉(v1.17.9 的
# 65409694% 离谱数值 bug 即前端无回归守卫的典型后果)。
# 与 Python 版本无关,故独立 job,避免在 test matrix 里跑 6 遍。
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: web-ui/package-lock.json
- run: npm ci
working-directory: web-ui
- run: npm run build
working-directory: web-ui