mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-12 08:31:03 +01:00
CI: install rsvg-convert on GitHub Actions runners (Phase 0 fix)
ubuntu-latest lacks librsvg2-bin, so test_render_writes_png was skipped in CI, leaving vector.py:156 uncovered and both Pre-commit checks and Python tests red at 99.98% (1 line miss). Installing the real dependency lets the test run instead of excluding the line. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
This commit is contained in:
parent
eb46b365cf
commit
4326ea421b
3
.github/workflows/pre-commit.yml
vendored
3
.github/workflows/pre-commit.yml
vendored
@ -23,8 +23,9 @@ jobs:
|
|||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
sudo apt-get update && sudo apt-get install -y zsh
|
sudo apt-get update && sudo apt-get install -y zsh librsvg2-bin
|
||||||
zsh --version
|
zsh --version
|
||||||
|
rsvg-convert --version
|
||||||
|
|
||||||
# Pin shellcheck instead of inheriting whatever ubuntu-latest ships.
|
# Pin shellcheck instead of inheriting whatever ubuntu-latest ships.
|
||||||
#
|
#
|
||||||
|
|||||||
5
.github/workflows/python-tests.yml
vendored
5
.github/workflows/python-tests.yml
vendored
@ -28,6 +28,11 @@ jobs:
|
|||||||
- uses: actions/setup-python@v5
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
|
- name: Install system dependencies
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
sudo apt-get update && sudo apt-get install -y librsvg2-bin
|
||||||
|
rsvg-convert --version
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
|
|||||||
@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"intent": "Fix the persistent CI red state on Pre-commit checks and Python tests (Phase 0 of NEXT_SESSION_PROMPT.md) by installing rsvg-convert on the GitHub Actions runners.",
|
||||||
|
"scope": [
|
||||||
|
".github/workflows/pre-commit.yml",
|
||||||
|
".github/workflows/python-tests.yml",
|
||||||
|
"no code under python_pkg/ changed"
|
||||||
|
],
|
||||||
|
"changes": [
|
||||||
|
"pre-commit.yml: added librsvg2-bin to the existing 'Install system dependencies' apt-get step, plus a rsvg-convert --version sanity check",
|
||||||
|
"python-tests.yml: added a new 'Install system dependencies' step that apt-get installs librsvg2-bin and verifies rsvg-convert is on PATH before pytest runs"
|
||||||
|
],
|
||||||
|
"verification": [
|
||||||
|
{
|
||||||
|
"command": "gh run list --limit 5",
|
||||||
|
"result": "confirmed red before this fix",
|
||||||
|
"evidence": "Pre-commit checks run 32185830767 completed failure at 2026-08-18T21:04:59Z, matching the coverage-gap signature documented in NEXT_SESSION_PROMPT.md Phase 0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "grep -n rsvg-convert python_pkg/artgate/tests/test_routes.py",
|
||||||
|
"result": "pass",
|
||||||
|
"evidence": "test_render_writes_png is skipif'd on shutil.which('rsvg-convert') is None; this is the exact test that would exercise vector.py:156, confirming the diagnosed root cause"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "python -m pytest python_pkg/artgate/tests/test_routes.py -k render_writes_png -v",
|
||||||
|
"result": "pass",
|
||||||
|
"evidence": "1 passed, 27 deselected -- test runs and passes locally where rsvg-convert is already installed"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"command": "pre-commit run --files .github/workflows/pre-commit.yml .github/workflows/python-tests.yml",
|
||||||
|
"result": "pass",
|
||||||
|
"evidence": "all applicable hooks passed (yaml checks, evidence-contract hook, secret scan, etc.)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"risks": [
|
||||||
|
"Confirmation is only local; the actual fix is only proven once the pushed commit's Pre-commit checks and Python tests workflows both go green on GitHub Actions",
|
||||||
|
"librsvg2-bin package name is Debian/Ubuntu-specific; correct for ubuntu-latest runners but would need adjustment if the runner image changes"
|
||||||
|
],
|
||||||
|
"rollback": [
|
||||||
|
"git revert this commit",
|
||||||
|
"After rollback, re-verify CI returns to the previously-known-red state with the same coverage-gap signature (99.98%, vector.py:156) to confirm the revert is clean"
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user