Skip to content

chore(ci): 增加 ruff 与 pytest 检查及 Dependabot - #3

Merged
dcdc4747 merged 2 commits into
mainfrom
chore/ci-ruff-pytest
Aug 5, 2026
Merged

chore(ci): 增加 ruff 与 pytest 检查及 Dependabot#3
dcdc4747 merged 2 commits into
mainfrom
chore/ci-ruff-pytest

Conversation

@dcdc4747

@dcdc4747 dcdc4747 commented Aug 5, 2026

Copy link
Copy Markdown
Owner

做了什么

  • CI 新增 ruff 代码风格检查与 pytest 单元测试(含 2 个最小测试:健康接口、任务列表)。
  • 后端 pyproject.toml 增加开发依赖组 dev(ruff / pytest / httpx),uv.lock 已同步。
  • main.py 改为 FastAPI 推荐的 Annotated 写法,通过 ruff B008 检查。
  • 新增 .github/dependabot.yml:GitHub Actions 与 Python 依赖每周自动检查更新。

怎么验证

  • 本地已跑通:ruff check 全部通过;pytest 2 passed。
  • CI 会按新配置在 PR 上自动执行 ruff、pytest、健康检查三步。

下一步

  • 合并后,队友提交的代码会先过机器检查;低级错误(语法、风格、测试失败)由机器拦截。
  • Dependabot 依赖安全提醒:仓库 Settings 里确认 Security alerts 已开启即可。

@dcdc4747
dcdc4747 merged commit 3bb2237 into main Aug 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant