Skip to content

Commit 6487411

Browse files
author
Hackercds
committed
fix(ci): 修两处 CI 失败
- requirements-dev.txt: 补 bandit + pip-audit(security job 找不到命令) - pyproject.toml: pytest pythonpath=['.'](CI 严格 sys.path 下 from app import 不再 ModuleNotFoundError) 本地 dry-run 验证(从 tests/ 子目录跑):8 passed · coverage 100% · bandit 0 issues
1 parent 0923bbd commit 6487411

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

code/backend/pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[tool.pytest.ini_options]
22
testpaths = ["tests"]
33
addopts = "-q"
4+
# 把 backend 根目录加进 sys.path,CI 在子目录跑也能 `from app import ...`
5+
pythonpath = ["."]
46

57
[tool.coverage.run]
68
source = ["app"]

code/backend/requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ httpx>=0.27
99
# 静态检查
1010
ruff>=0.3
1111
mypy>=1.8
12+
13+
# 安全门
14+
bandit>=1.7
15+
pip-audit>=2.7

0 commit comments

Comments
 (0)