Skip to content
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,15 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Ensure Python tooling test dependencies
run: |
if ! command -v rg >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install --no-install-recommends -y ripgrep
fi
- name: Test release verification tooling
run: |
python3 -m unittest scripts.tests.test_verify_public_release scripts.tests.test_collect_release_bundle scripts.tests.test_release_readiness scripts.tests.test_release_publication scripts.tests.test_check_markdown_links
python3 -m py_compile scripts/verify_public_release.py scripts/collect_release_bundle.py scripts/release_readiness.py scripts/release_publication.py scripts/release_operator.py scripts/check_markdown_links.py
bash scripts/test_python_tooling.sh
python3 scripts/release_operator.py --help >/dev/null
python3 scripts/release_operator.py preflight --help >/dev/null
python3 scripts/release_operator.py readiness-start --help >/dev/null
Expand Down
3 changes: 1 addition & 2 deletions scripts/release_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ done
# Stage 9: release verification tooling self-tests
# ----------------------------------------------------------------------------
stage_start "release verification tooling self-tests"
if python3 -m unittest scripts.tests.test_verify_public_release scripts.tests.test_collect_release_bundle scripts.tests.test_release_readiness scripts.tests.test_release_publication scripts.tests.test_check_markdown_links \
&& python3 -m py_compile scripts/verify_public_release.py scripts/collect_release_bundle.py scripts/release_readiness.py scripts/release_publication.py scripts/release_operator.py scripts/check_markdown_links.py \
if bash scripts/test_python_tooling.sh \
&& python3 scripts/release_operator.py --help >/dev/null \
&& python3 scripts/release_operator.py preflight --help >/dev/null \
&& python3 scripts/release_operator.py reclaim-tag --help >/dev/null \
Expand Down
19 changes: 19 additions & 0 deletions scripts/test_python_tooling.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
cd "$ROOT"

python3 - <<'PY'
from pathlib import Path

paths = sorted(Path("scripts").rglob("*.py"))
for path in paths:
source = path.read_bytes()
compile(source, str(path), "exec")
print(f"syntax-checked {len(paths)} Python files under scripts/")
PY

python3 -m unittest discover \
--start-directory scripts/tests \
--pattern 'test_*.py'
Loading