Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump Nox #2865

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "cookiecutter/**"
- "e2e-tests/cookiecutters/**"
- ".github/workflows/cookiecutter-e2e.yml"
- ".github/workflows/resources/requirements.txt"
push:
branches:
- main
Expand All @@ -17,6 +18,7 @@ on:
- "cookiecutter/**"
- "e2e-tests/cookiecutters/**"
- ".github/workflows/cookiecutter-e2e.yml"
- ".github/workflows/resources/requirements.txt"
workflow_dispatch:

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/resources/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
griffe~=1.5
nox==2024.10.9
nox @ git+https://github.com/wntrblm/nox.git@main
pre-commit==4.1.0
twine==6.1.0
16 changes: 7 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
]
main_python_version = "3.13"
locations = "singer_sdk", "tests", "noxfile.py", "docs/conf.py"
nox.options.sessions = [
nox.options.sessions = (
"mypy",
"tests",
"benches",
"doctest",
"test_cookiecutter",
]
)

# TODO: https://github.com/wntrblm/nox/pull/917
dependency_groups = nox.project.load_toml("pyproject.toml")["dependency-groups"]
test_dependencies: list[str] = dependency_groups["dev"]
typing_dependencies: list[str] = dependency_groups["typing"]
Expand Down Expand Up @@ -219,9 +220,7 @@ def test_cookiecutter(session: nox.Session, replay_file_path: Path) -> None:
# TODO: Use uvx
# https://github.com/wntrblm/nox/pull/920
session.run(
"uv",
"tool",
"run",
"uvx",
"cookiecutter",
"--replay-file",
str(replay_file),
Expand All @@ -243,11 +242,11 @@ def test_cookiecutter(session: nox.Session, replay_file_path: Path) -> None:

# Check that the project can be built for distribution
session.run("uv", "build")
session.run("uv", "tool", "run", "twine", "check", "dist/*")
session.run("uvx", "twine", "check", "dist/*")

session.run("git", "init", "-b", "main", external=True)
session.run("git", "add", ".", external=True)
session.run("uv", "tool", "run", "pre-commit", "run", "--all-files", external=True)
session.run("uvx", "pre-commit", "run", "--all-files", external=True)


@nox.session(name="version-bump")
Expand Down Expand Up @@ -276,7 +275,6 @@ def version_bump(session: nox.Session) -> None:
def api_changes(session: nox.Session) -> None:
"""Check for API changes."""
args = [
"griffe",
"check",
"singer_sdk",
]
Expand All @@ -287,4 +285,4 @@ def api_changes(session: nox.Session) -> None:
if "GITHUB_ACTIONS" in os.environ:
args.append("-f=github")

session.run("uv", "tool", "run", *args, external=True)
session.run("uvx", "griffe", *args, external=True)
Loading