testsAndMisc/.github/workflows/python-tests.yml
Krzysztof kuhy Rudnicki 4326ea421b 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
2026-08-18 23:10:38 +02:00

42 lines
1.2 KiB
YAML

name: Python tests
on:
push:
branches: [main]
paths:
- "python_pkg/lichess_bot/**"
- "python_pkg/**"
- "tests/**"
- "linux_configuration/scripts/periodic_background/system-maintenance/bin/**"
- "linux_configuration/tests/**"
- "requirements.txt"
pull_request:
branches: [main]
paths:
- "python_pkg/lichess_bot/**"
- "python_pkg/**"
- "tests/**"
- "linux_configuration/scripts/periodic_background/system-maintenance/bin/**"
- "linux_configuration/tests/**"
- "requirements.txt"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
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
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run pytest with coverage
run: pytest --cov=python_pkg --cov-branch --cov-report=term-missing --cov-fail-under=100