ci(release): enforce changed-scope Ruff gate
Publish verified PortfolioHub image / verify (push) Canceled after 0s
Publish verified PortfolioHub image / publish (push) Canceled after 0s

This commit is contained in:
2026-09-13 15:41:35 +09:00
parent 1010d257ad
commit 4520fbbfbd
5 changed files with 147 additions and 89 deletions
+4 -8
View File
@@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
ref: ${{ github.sha }}
fetch-depth: 1
fetch-depth: 0
- run: python scripts/image_release.py validate-checkout --actual "$(git rev-parse HEAD)" --expected "${GITHUB_SHA}"
- run: python scripts/image_release.py validate-event --event "${GITHUB_EVENT_NAME}" --ref "${GITHUB_REF}" --commit "${GITHUB_SHA}" --project pyproject.toml
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -42,14 +42,10 @@ jobs:
- run: uv run pytest -q
- name: Honest scoped lint
run: uv run ruff check --select F,I app/db/migrations.py scripts/image_release.py scripts/ruff_ratchet.py tests/release
- name: Reject increases over the v0.2.1 Ruff debt baseline
- name: Reject Ruff findings introduced by v0.3.0 or its patch
run: |
set +e
uv run ruff check . --output-format=json > ruff-diagnostics.json
ruff_status=$?
set -e
test "$ruff_status" -eq 0 -o "$ruff_status" -eq 1
uv run python scripts/ruff_ratchet.py ruff-diagnostics.json
uv run python scripts/ruff_ratchet.py --base v0.2.1
uv run python scripts/ruff_ratchet.py --base v0.3.0
- name: Record exact source migration inventory
run: uv run python -c 'from app.db.migrations import migration_inventory; print("\n".join(migration_inventory()))' > migration-inventory.txt
- name: Create excluded synthetic canary