-
Notifications
You must be signed in to change notification settings - Fork 0
ci: make validate.sh run the consumer suite #35
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
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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #!/usr/bin/env bash | ||
| set -euo pipefail | ||
|
|
||
| required_files=( | ||
| README.md | ||
|
|
@@ -21,4 +22,24 @@ for file in "${required_files[@]}"; do | |
| } | ||
| done | ||
|
|
||
| printf 'Repository baseline is present.\n' | ||
| command -v python >/dev/null || { | ||
| printf 'Python is required; install the project development extra first.\n' >&2 | ||
| exit 1 | ||
| } | ||
|
|
||
| python - <<'PY' | ||
|
Contributor
Author
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. Bug: the new distribution-version gate never actually blocks the script.
I verified this pattern in isolation: Suggest adding |
||
| from importlib.metadata import PackageNotFoundError, version | ||
|
|
||
| for distribution in ("base-cli-demo", "base-cli", "pytest"): | ||
| try: | ||
| installed_version = version(distribution) | ||
| except PackageNotFoundError as exc: | ||
| raise SystemExit( | ||
| f"Missing installed distribution {distribution!r}; " | ||
| 'run `python -m pip install ".[dev]"` first.' | ||
| ) from exc | ||
| print(f"Found {distribution} {installed_version}.") | ||
| PY | ||
|
|
||
| printf 'Running the complete consumer and documentation-command suite.\n' | ||
| exec python -m pytest -q | ||
|
Contributor
Author
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. Cross-file impact: folding pytest into validate.sh makes two other workflows run the full suite twice. This PR only updates
With this Worth updating those two workflows (drop their now-redundant explicit pytest step) as part of this change, or keeping validate.sh's pytest invocation opt-in so existing call sites aren't silently doubled. |
||
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.
Minor: lost fail-fast behavior for the baseline check.
Previously 'Validate repository baseline' ran as the very first step, before 'Set up Python' — a missing required file (e.g. LICENSE, CHANGELOG.md) failed within seconds. Now
./tests/validate.shonly runs after Python setup andpip install ".[dev]"complete, and (per the change intests/validate.sh) it now also runs the entire pytest suite at the end. A trivial baseline failure that used to surface almost instantly now waits through the full environment setup first.