mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-13 03:30:58 +01:00
Headless, the viewport, fit-check and keyboard tests skip -- 25 of them -- and take their coverage with them, which is why this job went red the moment they landed: 100% is the bar and _fitcheck drops to 47%, _keyboard to 18%. Skipping is the worse half. These tests exist because Tk's own focus delivery and canvas scrolling cannot be mocked -- mocking them is exactly how a viewport that scrolled itself passed every check for a week -- so a green run that skipped them would be reporting nothing about the thing they guard. xvfb-run gives the runner a display, which is what every local run already used. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BsXnTHyuuCUZsqetTaajcF
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: gatelock tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths: ['gatelock/**']
|
|
pull_request:
|
|
branches: [main]
|
|
paths: ['gatelock/**']
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: gatelock
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
# The viewport, fit-check and keyboard tests drive real Tk: focus
|
|
# delivery, canvas scrolling and widget heights are Tk's own behaviour,
|
|
# and mocking them is what let a viewport that scrolled itself pass
|
|
# every check for a week. Headless they skip, silently taking coverage
|
|
# with them -- so the runner gets a display instead.
|
|
- name: Install a virtual X display
|
|
run: sudo apt-get update && sudo apt-get install -y xvfb
|
|
|
|
- name: Run tests with coverage
|
|
run: xvfb-run -a -s "-screen 0 1600x1200x24" python -m pytest -v
|