testsAndMisc/.github/workflows/python-tests.yml
Krzysztof kuhy Rudnicki 4a35be73c6 CI: make python-tests.yml self-triggering + add workflow_dispatch
The rsvg-convert fix landed in a commit that only touched workflow
files, which python-tests.yml's path filter doesn't watch -- so the
workflow never re-ran and gh run rerun replays the old, pre-fix
definition instead of the current one. Adding the workflow's own
path to its filter and workflow_dispatch closes both gaps.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY
2026-08-18 23:19:43 +02:00

45 lines
1.3 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"
- ".github/workflows/python-tests.yml"
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"
- ".github/workflows/python-tests.yml"
workflow_dispatch: {}
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