-
Notifications
You must be signed in to change notification settings - Fork 1.8k
tests: add twine presubmit check #18292
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -790,13 +790,11 @@ def lint(session): | |||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| @nox.session(python=NEWEST_PYTHON) | ||||||||||||||||||||||||
| def lint_setup_py(session): | ||||||||||||||||||||||||
| # TODO(https://github.com/googleapis/google-cloud-python/issues/16186): | ||||||||||||||||||||||||
| # SKIP: This session was not enforced in the standalone (split) repo | ||||||||||||||||||||||||
| # and is disabled here to ensure a "move-only" migration. | ||||||||||||||||||||||||
| session.skip( | ||||||||||||||||||||||||
| "Skipping now to avoid changing code during migration. See Issue #16186" | ||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||
| def lint_twine_check(session): | ||||||||||||||||||||||||
| """Verify that the package is valid using twine.""" | ||||||||||||||||||||||||
| session.install("twine", "build") | ||||||||||||||||||||||||
| session.run("python", "-m", "build", "--sdist") | ||||||||||||||||||||||||
| session.run("twine", "check", "--strict", "dist/*") | ||||||||||||||||||||||||
|
Comment on lines
+793
to
+797
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In
Suggested change
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| @nox.session(python="3.10") | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In
nox,session.runexecutes commands directly without a shell by default (shell=False). Consequently, the wildcard patterndist/*will not be expanded by the shell, andtwinewill receive the literal string'dist/*', causing the check to fail. Use Python'sglobmodule to expand the wildcard pattern before passing the file paths tosession.run.