Skip to content

Commit 0a5d890

Browse files
fix: fix github action
1 parent beaf30f commit 0a5d890

File tree

4 files changed

+10
-19
lines changed

4 files changed

+10
-19
lines changed

noxfile.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def install_with_uv(session: nox.Session, extras: list[str] | None = None) -> No
3838
extras: Optional list of extra dependency groups to install (e.g. ["dev", "docs"])
3939
"""
4040
session.install("uv")
41-
session.install("ruff") # Explicitly install ruff
4241
if extras:
4342
session.run("uv", "sync", *(f"--extra={extra}" for extra in extras))
4443
else:
@@ -80,9 +79,6 @@ def test(session: nox.Session) -> None:
8079
session.run(
8180
"uvx",
8281
"pytest",
83-
"--cov=repo_scaffold",
84-
"--cov-report=term-missing",
85-
"--cov-report=xml",
8682
"-v",
8783
"tests",
8884
)
@@ -115,7 +111,7 @@ def test_all(session: nox.Session) -> None:
115111
] + test_args
116112

117113
# 运行测试
118-
session.run("uvx","pytest", *test_args)
114+
session.run("uvx", "pytest", "-v", *test_args)
119115

120116

121117
@nox.session(reuse_venv=True)

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ docs = [
3131
"mkdocstrings-python>=1.7.5",
3232
"mkdocs-gen-files>=0.5.0",
3333
"mkdocs-literate-nav>=0.6.1",
34+
"pymdown-extensions>=10.7",
3435
]
3536

3637
[project.scripts]
@@ -43,11 +44,6 @@ repo_scaffold = ["templates/**/*", "cookiecutter.json"]
4344
requires = ["hatchling"]
4445
build-backend = "hatchling.build"
4546

46-
[dependency-groups]
47-
dev = [
48-
"ruff>=0.9.6",
49-
]
50-
5147
[tool.ruff]
5248
line-length = 120
5349
include = ["pyproject.toml", "repo_scaffold/*.py"]
@@ -81,6 +77,10 @@ lines-after-imports = 2
8177
[tool.ruff.lint.pydocstyle]
8278
convention = "google"
8379

80+
[tool.pytest.ini_options]
81+
addopts = "--cov=repo_scaffold --cov-report=term-missing --cov-report=xml"
82+
testpaths = ["tests"]
83+
8484
[tool.commitizen]
8585
name = "cz_conventional_commits"
8686
tag_format = "$version"

repo_scaffold/templates/template-python/{{cookiecutter.project_slug}}/noxfile.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def install_with_uv(session: nox.Session, extras: list[str] | None = None) -> No
4141
extras: Optional list of extra dependency groups to install (e.g. ["dev", "docs"])
4242
"""
4343
session.install("uv")
44-
session.install("ruff") # Explicitly install ruff
4544
if extras:
4645
session.run("uv", "sync", *(f"--extra={extra}" for extra in extras))
4746
else:

uv.lock

Lines changed: 4 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)